What is the difference between apt-get purge autoremove and apt-get purge remove dependencies. We will learn about sudo apt purge autoremove and sudo apt purge vs remove in Linux Ubuntu Systems.
Difference Between Purge And Remove In Linux
Before we begin, you must be aware that the apt-get is the command-line tool for handling packages, and may be considered the user’s “back-end” to other tools using the APT library.
apt-get remove
The command apt-get remove PACKAGE_NAME removes the package binaries, but it’s configuration files and installed dependencies will remain in the system. remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
apt-get purge
The command apt-get purge PACKAGE_NAME 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. purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
apt-get autoremove
The command apt-get autoremove PACKAGE_NAME will remove the package as well as its dependencies, if those dependencies aren’t used by other packages. autoremove (and the auto-remove alias since 1.1) is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
Note that if the package name is not specified with autoremove, it will remove all the unused dependencies in the system.