After understanding that apt is somehow an expansion of apt-get or an aggregation of several apt-… commands, I'm still confused how the different commands (especially apt, apt-get, aptitude and the subcommand(s) autoclean, autoremove, clean) do their job and which one fulfil my needs (fully deleting packages which I don't need any more after manually removing other packages).


autoremove is what you’re looking for: it removes automatically-installed packages which no longer have any dependencies. apt autoremove and apt-get autoremove are equivalent. aptitude doesn’t have an autoremove subcommand because it always removes such packages when they become candidates for removal (i.e. auto-removable packages are removed along with the package whose removal causes them to become auto-removable).

Note that package installation and auto-removal isn’t symmetric in the default configuration; see How do recommends and suggests interact with apt-get dist-upgrade and apt-get autoremove? for details.

clean removes all downloaded .deb files from the package caches, and autoclean removes those which can no longer be downloaded. Both of these subcommands behave in the same way, with apt, apt-get and aptitude.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.