Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
272
rated 0 times [  272] [ 0]  / answers: 1 / hits: 541890  / 2 Years ago, thu, october 20, 2022, 6:08:56

Is there any difference between



sudo apt-get purge <package-name>


and



sudo apt-get remove <package-name>  


?



I often see people recommend one or the other.



In other words, what does apt-get purge remove that apt-get remove doesn't?


More From » apt

 Answers
1

As the man apt-get page says:



remove - 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.


purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).



This of course, does not apply to packages that hold configuration files inside the user's home folder (e.g. /home/Ubuntu_User), these files will not be touched ( Why does "Purge" not remove everything related to an app? )


So for example, if you were to purge Chrome, Firefox, Kodi, or any other that holds some configuration files inside your /home folder, these configuration files will stay there.


On the other hand, if you were to install Apache, squid, MySQL, or any other services similar that save their configuration files in /etc, these configuration files will be deleted if you use purge.


[#33563] Friday, October 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otputler

Total Points: 53
Total Questions: 105
Total Answers: 93

Location: Zimbabwe
Member since Wed, Nov 9, 2022
2 Years ago
otputler questions
Tue, Aug 23, 22, 14:36, 2 Years ago
Fri, Jul 23, 21, 11:57, 3 Years ago
Sun, Feb 12, 23, 18:37, 1 Year ago
;