Differentiating between ‘apt-get purge’ and ‘apt-get take away’:
Many individuals contemplate that ‘apt-get purge’ and ‘apt-get take away’ instructions can be utilized interchangeably as a result of in any case, they serve the exact same function i.e. each of them are accountable for uninstalling packages. This assertion is partially true. It’s completely proper that each of those instructions can be utilized to uninstall packages on the Linux working system however the way in which they uninstall the packages is totally different.
The ‘apt-get take away’ command solely uninstalls a package deal however its configuration file stays proper there. Nonetheless, while you take away a package deal with the ‘apt-get purge’ command, then a package deal together with its configuration file is deleted which implies that no traces of that package deal are left behind on this state of affairs.
At instances, you might be supplied with the freedom of customizing a package deal in keeping with the necessities of the duty for which you’ve gotten put in that package deal. For doing that, it’s a must to make modifications in its configuration file. Now if you wish to preserve that personalised configuration file with you for future utilization even after deleting a package deal, then you must make use of the ‘apt-get take away’ command however in order for you the configuration file to be deleted together with the package deal, then you must use the ‘apt-get purge’ command. Now we will even stroll you thru an instance so as to simply confirm the distinction between these two instructions.
Notice: The state of affairs proven beneath has been demonstrated on Linux Mint 20. It will also be verified by working it on different Linux distributions.
Demonstrating the utilization of ‘apt-get take away’ and ‘apt-get purge’ to focus on their Distinction:
For demonstrating the utilization of ‘apt-get take away’ and ‘apt-get purge’, we’re making use of the snapd package deal in Linux Mint 20. We are going to first attempt to take away that package deal with ‘apt-get take away’ and present you what occurs after that. After which we are going to reinstall the identical package deal and take away it with ‘apt-get purge’ and reveal what occurs when you’ll accomplish that. The purpose to be famous over right here is that each package deal that you simply set up on Linux has a configuration file with it which both resides within the Residence folder or the and many others folder. The configuration file of the snapd package deal is situated inside the and many others folder and you’ll simply discover it by looking for it as highlighted within the following picture:
After verifying that the configuration file of the snapd package deal truly exists, you’ll have to proceed as follows:
- Open the Linux Mint 20 terminal by clicking on its icon current on the taskbar and sort the command proven beneath:
$ sudo apt-get take away snapd
Right here, you may substitute snapd with the identify of every other package deal that you simply wish to uninstall whereas making use of the ‘apt-get take away’ command.
- As quickly as you’ll execute this command by urgent the Enter key, you’ll be requested to supply your affirmation on uninstalling the required package deal. Kind “Y” to hold on with this course of as you too can see from the picture proven beneath:
- The uninstallation course of will take just a few seconds to finish efficiently and when it’s performed, it is possible for you to to see the next output in your terminal:
- Now return to the and many others folder and seek for snapd. You’ll nonetheless be capable of see its configuration file over there for the reason that ‘apt-get take away’ command isn’t able to eradicating the configuration information. This may be verified from the picture proven beneath:
- After doing this, we’ve got reinstalled the exact same snapd package deal for the sake of the demonstration. Nonetheless, this time we are going to attempt to uninstall it whereas utilizing the next command:
$ sudo apt-get purge snapd
Once more, you may substitute snapd with the identify of every other package deal that you simply wish to be uninstalled whereas utilizing the ‘apt-get purge’ command.
- When you’ll execute the ‘apt-get purge’ command by urgent the Enter key after typing it in your terminal, you’ll be prompted to substantiate your motion. You possibly can merely do that by typing in “Y” after which press the Enter key as highlighted within the picture proven beneath:
- As quickly because the uninstallation of the snapd package deal will full, your Linux Mint 20 terminal will render the next output on it:
- Now return to the and many others folder and attempt to seek for snapd. This time, you will be unable to seek out any configuration file for this package deal for the reason that ‘apt-get purge’ command removes all of the traces of the package deal together with its configuration file.
Therefore, it’s verified that the ‘apt-get purge’ command is able to deleting the configuration information of the packages whereas the ‘apt-get take away’ command isn’t.
On this means, you may simply make use of the ‘apt-get purge’ and ‘apt-get take away’ instructions in several eventualities. You possibly can delete any package deal of your alternative by making use of those instructions in keeping with your wants. This text explains to you intimately the working of each these instructions and it additionally explains the capabilities of each these instructions. One other level to be famous over right here is that even the ‘apt-get purge’ command can solely delete these configuration information which might be saved within the and many others folder i.e. this command can not delete the configuration information of the packages which might be saved within the Residence folder.
apt-get remove purge,dpkg –remove package and dependencies,dpkg –purge,apt-get wants to remove packages,dpkg list installed packages,how to remove a package and its dependencies,apt-get purge autoremove,apt-get purge multiple packages,apt purge after remove,apt purge dependencies,apt purge wildcard,apt-get remove –purge,debian package manager gui,debian package dependencies,debian package repository,dh_install,debian/control file,exploring debian,docker ubuntu image,install docker centos,install docker ubuntu,install docker compose,install docker debian,docker latest version,ubuntu remove all packages except base,how to uninstall everything from ubuntu,termux uninstall all packages,centos 7 remove all installed packages,how to reset ubuntu to default,ubuntu remove all packages installed today,apt-get clean purge,uninstall linux,sudo apt-get purge command,apt-get install packages,install, update and remove software in linux,how to remove package with dependencies in linux,command line option purge is not understood in combination with the other options