apt

The Debian Package manager (apt-cache, apt-get, install, search)

Search for packages containing the word emacs in their name or description:
apt-cache search emacs
Install package emacs21:
apt-get install emacs21
Remove package wine including all configuration files:
apt-get remove --purge wine
Reinstall a package:
apt-get --reinstall install wine
Sometimes, you need to use dpkg to reconfigure a package, e.g. here the bittorrent sync package:
dpkg-reconfigure btsync