In Debian based distributions, by default there are two ways to manage packages on the command line: apt-get and aptitude. The better of the two is aptitude. In fact, it looks like the only advantage apt-get has over aptitude is the easier name.
The problem is in removing packages. You see, apt-get does a great job of indentifying what dependencies need to be installed when you want a certain package, but it fails miserably when you want to remove that package. If dependencies were required, â€˜apt-get removeâ€™ will remove your packages, but leave orphaned dependencies on your system.
Here are the basic commands to get you started with aptitude:
aptitude install packagename
aptitude remove packagename
Running aptitude with no options will bring up a text-based GUI.