Thursday, January 31, 2013

apt-get remove vs. purge vs. autoremove

Let's explain this by taking Tomboy package as the one to be removed.

remove
apt-get remove tomboy
This removes the tomboy package, but it's configuration files and installed dependencies will remain in the system.

purge
apt-get purge tomboy
This removes the package as well as its configuration files. But the dependencies will remain in the system. However, configuration files in the home directory won't get removed.
This command is same as using --purge option with the above remove command.

autoremove
apt-get autoremove tomboy
This will remove the package as well as its dependencies, if those dependencies aren't used by other packages.
If the package name is not specified with autoremove, it will remove all the unused dependencies in the system.

Ref:
[1] https://help.ubuntu.com/community/AptGet/Howto
[2] http://askubuntu.com/questions/187888/what-is-the-correct-way-to-completely-remove-an-application

No comments: