Wednesday, February 14, 2018

what is the difference between apt-get remove and purge and autoremove in ubuntu?

apt-get remove vs  purge vs autoremove

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

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

apt-get purge wget
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 wget
This will remove the package as well as its dependencies, if those dependencies aren't used by other packages.
apt-get autoremove
If the package name is not specified with autoremove, it will remove all the unused dependencies in the system.

No comments:

Post a Comment