Score:1

What is the Difference Between "apt autoremove --purge" & "apt purge --autoremove"

id flag

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

Jeff avatar
mx flag
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?
Gaia avatar
id flag
I get that the cmds are structurally different, but I am concerned about how they are, if at all, behaviorally different.
Jeff avatar
mx flag
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`.
waltinator avatar
it flag
Does reading `man apt` not help?
Gaia avatar
id flag
they both seem to work though https://i.imgur.com/53gIdxL.png
Score:2
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.