[xubuntu] how to reinstall network manager and its friends

view story

http://ubuntuforums.org – One day my pdnsd stopped working. sudo netstat -lpn |grep:53 implied that the port used by dnsmasq. So I mindlessly apt-get remove the dnsmasq because it refused to be killed. Unfortunately some important packages wiped out automatically in the process. Right now, the network icon on upper right screen is lost. And my netbook can't browse the internet although it can ping google correctly. How to cure this without reinstalling the Xubuntu from the scratch? (Hardware)