8

As I understand, apt autoremove --purge purges (as opposed to only removing) all packages eligible for autoremove.

But I cannot grasp how apt purge --autoremove would be any different. I can't think of any room for different behavior.

Are these two equivalent? Both cmds run fine:

enter image description here

Gaia
  • 861
  • The purge command is a part of the apt autoremove command. You have to put them in order to be able to run the command... Autoremove is a sub-command of apt, and --purge is a sub-command of autoremove. You have to call the first sub command before running the last sub-command. If you do them in the wrong order, it won't work. Sub command isn't really a thing, but you know what I mean by it, right? – Logan Feb 17 '22 at 21:50
  • 1
    I get that the cmds are structurally different, but I am concerned about how they are, if at all, behaviorally different. – Gaia Feb 17 '22 at 21:55
  • I think that I explained that... If the commands are in the wrong order, they won't work. That is how they are behaviorally different. apt purge --autoremove is in the wrong order, as --purge is a sub-part of autoremove. – Logan Feb 17 '22 at 21:57
  • Does reading man apt not help? – waltinator Feb 17 '22 at 23:17
  • they both seem to work though https://i.imgur.com/53gIdxL.png – Gaia Feb 17 '22 at 23:56

1 Answers1

10

None: the end result will be the same. Both apt autoremove --purge and apt purge --autoremove will cause orphan dependencies, i.e., packages automatically installed and not anymore required by any other package, to be removed, including their system wide configuration files ("purge").

Without the options, they will behave differently. apt autoremove will do an autoremove, whereas apt purge will do nothing because no package was specified.

vanadium
  • 88,010