Sunday, May 5, 2024
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 71409  / 1 Year ago, wed, april 19, 2023, 11:47:48

What is the difference between sudo apt-get purge and sudo apt get remove --purge?



There must be a difference or both of them shouldn't exist.


More From » command-line

 Answers
5

Whether they should or shouldn't both exist is perhaps a debating point.



However - they are absolutely identical.



From the man page of apt-get




--purge
Use purge instead of remove for anything that would be removed. An
asterisk ("*") will be displayed next to packages which are
scheduled to be purged. remove --purge is equivalent to the purge
command. Configuration Item: APT::Get::Purge.


They key part is --purge is equivalent to the purge command



As to why - I would surmise this is historical -



apt-get --purge remove came before apt-get purge



Looking at the old apt documentation it make reference to the older version of the command. The newer documentation gives the aptitude & apt-get purge example.



For the sake of consistency - its a good idea to not remove old interfaces - if you have an old script - it will still work today because the interface commands still exist.



Mind you that doesnt stop Gnome from deprecating api's - but that's another story...


[#35756] Friday, April 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fishutt

Total Points: 391
Total Questions: 137
Total Answers: 106

Location: Mexico
Member since Tue, Aug 11, 2020
4 Years ago
;