Correct use of apt-get remove/purge/autoremove

Niki Kovacs contact at kikinovak.net
Wed Mar 16 08:18:44 UTC 2011


Hi,

I'm currently trying to get a firmer grasp on package management.

1) 'apt-get remove' removes a package or a series of packages, but 
leaves configuration files untouched. Plus, eventual dependencies are 
also left on the system.

2) 'apt-get purge' removes a package or a series of packages, as well as 
their respective configuration files. Eventual dependencies are left on 
the system.

3) 'apt-get autoremove' removes a package as well as all the 
dependencies that are only needed by this single package. On the other 
hand, configuration files are left on the system.

It would seem logical to me to combine these, two, e. g. if I have 
apache2 on a system and decide I don't want a web server anymore, to 
'autoremove' the apache2 package (which comes with a bunch of 
dependencies) as well as purge the whole cruft of configuration files. 
But what would be the orthodox way of doing so?

Cheers from the rain-flooded South of France,

Niki




More information about the ubuntu-users mailing list