How can I reverse sudo apt-get install command

In ubuntu, I did these commands:

sudo apt-get install build-essential vala-desktop-agnostic checkinstall
sudo apt-get build-dep avant-window-navigator

How can i un-apt-get, or uninstall the packages it pulls in?


Solution 1:

First your remove the packages with remove or purge

sudo apt-get purge build-essential vala-desktop-agnostic checkinstall
sudo apt-get purge ....

Then you remove now unneeded dependencies

sudo apt-get autoremove

In the case of build-dep you will have to figure out manually which packages are build-dependencies of avant-window-manager. Synaptic will tell you that.

Solution 2:

apt-get remove should do the trick, apt-get purge if you want to dump the config files as well.