Page 1 of 1
sudo apt autoremove
Posted: Mon Mar 05, 2018 1:50 pm
by TJ Hoye
@ MX-devs
The dist-upgrade process often requires a separate apt autoremove
operation to reclaim some space formerly occupied by outdated material.
Couldn't this separate operation just as well be included as a final step
in the normal dist-upgrade process and not be left as a separate step?
TIA & thanks for this outstanding distro.
Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 1:58 pm
by Stevo
You can add it as an option in the MX updater.
Since this command can also destroy a system if a beginner starts messing with metapackages, as it has so many times in the past, I would not add it as an automatic option. People have said, "sure, remove 800 packages? Seems legit" way, way, too many times in the past.
Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 1:59 pm
by dolphin_oracle
we have thought about that in the past. however, a badly packaged deb, or one from an outside repo with conflicting dependency information, can create package conflicts that apt-get has interesting solutions for. like removing all your desktop environment for instance. if we did the autoremove automatically, it could be disastrous, even if we had a confirmation prompt and the user wan't paying real close attention.
better safe than sorry.
***ninja'd by stevo

Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 2:00 pm
by chrispop99
Just to be clear, apt autoremove is not a required step, only an optional one.
With the size of disks currently in use, the relative amount of free space recovered is minimal, and it's something I have never bothered with.
Chris
Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 2:05 pm
by Stevo
You can also use aptitude to manage packages, which will autoremove by default. Luckily, it asks first before proceeding to nuke your system.
Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 7:35 pm
by TJ Hoye
Thanks to all for your cautionary advice.
I know its a terrabyte world for most folks, but I'm exclusively 'live'.
My Cruzer world is at most only 16 Gb of which I usually use only a few Gb
for my LiveUSB. Happily so with MX. It's a delight. Still...
The mere thought of a few Kb going to no good use seems like something
to respond-to. And...
It does seem a little inconsistent to take all of the automatic, unchallenged
changes in any given dist-upgrade on faith that nothing bad might happen,
yet be hesitent about the suggestions on recouping some unused space after
all the magic of the upgrade has occurred.
I get it. I'll not automatically autoremove.
TJH
Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 7:40 pm
by dolphin_oracle
TJ Hoye wrote:Thanks to all for your cautionary advice.
....
It does seem a little inconsistent to take all of the automatic, unchallenged
changes in any given dist-upgrade on faith that nothing bad might happen,
yet be hesitent about the suggestions on recouping some unused space after
all the magic of the upgrade has occurred.
I get it. I'll not automatically autoremove.
TJH
ah, but remember grasshopper, our default updater settings let you look at the updates before they are installed. this can also point out bizzare conflicts.
the options are there if you want to use them dude. autoremove just isn't the default.
Re: sudo apt autoremove
Posted: Mon Mar 05, 2018 7:51 pm
by Jerry3904
I love that feature!
Re: sudo apt autoremove
Posted: Sat Jul 03, 2021 9:44 pm
by rmcaetanoalves
Stevo wrote: Mon Mar 05, 2018 1:58 pm
You can add it as an option in the MX updater.
Since this command can also destroy a system if a beginner starts messing with metapackages, as it has so many times in the past, I would not add it as an automatic option. People have said, "sure, remove 800 packages? Seems legit" way, way, too many times in the past.
I think the MX Linux update system is amazing, it is very efficient.
But I would like to know if it is possible to run the command "apt autoremove" without the need for me to type in the terminal, when updating the components, in the same way that it is done for updating.
If possible, where can I adjust this option?
link:
https://imgur.com/OoHFSGc.png
Re: sudo apt autoremove
Posted: Sat Jul 03, 2021 11:21 pm
by MXRobo
I think the fact that the upgrader/updater so nonchalantly suggests to use sudo apt autoremove seems to imply that it not only is safe to use, but is expected to be used and is therefore a little misleading, unless of course you already know better.
IIWM, I’d reword it to reflect is potential consequences, or possibly remove it as a suggestion.
As a newbie, I was using it on MX and GalliumOS up until about a month ago when I saw cautionary comments about using it in the MX forum.
Again, I thought the forum and the updater were sending conflicting messages.
Just a thought, love the distro.
Re: sudo apt autoremove
Posted: Sun Jul 04, 2021 2:25 am
by asqwerth
Unfortunately the "autoremove" portion is simply part of the terminal message that comes up in Debian's apt dist-upgrade process, as I understand it.
And since mx updater is a front end to that command, the terminal window that opens in mx-updater will show that too.
Wonder if a warning pop-up the first time one clicks on the updater is warranted. On the other hand, there are users who hate having so many one-time warning pop-ups (eg in the mxpi test repo and flatpak tabs).
Re: sudo apt autoremove
Posted: Sun Jul 04, 2021 10:32 am
by dolphin_oracle
asqwerth wrote: Sun Jul 04, 2021 2:25 am
Unfortunately the "autoremove" portion is simply part of the terminal message that comes up in Debian's apt dist-upgrade process, as I understand it.
And since mx updater is a front end to that command, the terminal window that opens in mx-updater will show that too.
Wonder if a warning pop-up the first time one clicks on the updater is warranted. On the other hand, there are users who hate having so many one-time warning pop-ups (eg in the mxpi test repo and flatpak tabs).
the message is perfectly valid, and it says what to do. I don't think a warning is necessary.
we used to have autoremove as an option in mx-updater, but we removed it some time ago due to the possibility of disasters.
Re: sudo apt autoremove
Posted: Sun Jul 04, 2021 12:51 pm
by MXRobo
the message is perfectly valid, and it says what to do. I don't think a warning is necessary.
we used to have autoremove as an option in mx-updater, but we removed it some time ago due to the possibility of disasters.
[/quote]
Dolphin,
For redundant clarification I am referring to something like this:
Code: Select all
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic linux-image-4.15.0-45-generic linux-modules-4.15.0-45-generic linux-modules-extra-4.15.0-45-generic
Use 'apt autoremove' to remove them.
Or sudo apt autoremove.
- which could be interpreted as though it is encouraged.
Here’s three points of views on how to deal with this, the first being more detailed.
https://unix.stackexchange.com/question ... r-required
https://www.cyberciti.biz/faq/debian-ub ... installed/
https://itectec.com/ubuntu/ubuntu-the-f ... at-to-do/
I biasedly included two from my INITIAL perspective.
But, in
THIS post, I am not advocating for a warning – just showing my initial, and others possible interpretations.
Have a nice day.

Re: sudo apt autoremove
Posted: Sun Jul 04, 2021 1:17 pm
by dolphin_oracle
It’s fine to do the auto remove but it should be manual so you have a chance to see what else gets removed
Re: sudo apt autoremove
Posted: Thu Jul 22, 2021 6:06 pm
by Ironfighter
This is quite an eye opener for me. I do my updates regularly and if I see the auto remove message that’s what I do. I have never broken anything in the past 2 years since I left Windows for MX. But it seems I could have done?
My question is how does a non technical user like myself decide what to do if I see that message? Is there a “how to” guide?
Re: sudo apt autoremove
Posted: Thu Jul 22, 2021 6:37 pm
by dolphin_oracle
Ironfighter wrote: Thu Jul 22, 2021 6:06 pm
This is quite an eye opener for me. I do my updates regularly and if I see the auto remove message that’s what I do. I have never broken anything in the past 2 years since I left Windows for MX. But it seems I could have done?
My question is how does a non technical user like myself decide what to do if I see that message? Is there a “how to” guide?
what I do is...if the autoremove only removes the things that were expected, then its OK. if all of a sudden 100s of packages are being removed, then I stop the process.
Re: sudo apt autoremove
Posted: Thu Jul 22, 2021 8:23 pm
by Ironfighter
dolphin_oracle wrote: Thu Jul 22, 2021 6:37 pm
what I do is...if the autoremove only removes the things that were expected, then its OK. if all of a sudden 100s of packages are being removed, then I stop the process.
Thanks for your advice

Re: sudo apt autoremove
Posted: Sun Jul 25, 2021 6:38 pm
by rmcaetanoalves
dolphin_oracle wrote: Thu Jul 22, 2021 6:37 pm
Ironfighter wrote: Thu Jul 22, 2021 6:06 pm
This is quite an eye opener for me. I do my updates regularly and if I see the auto remove message that’s what I do. I have never broken anything in the past 2 years since I left Windows for MX. But it seems I could have done?
My question is how does a non technical user like myself decide what to do if I see that message? Is there a “how to” guide?
what I do is...if the autoremove only removes the things that were expected, then its OK. if all of a sudden 100s of packages are being removed, then I stop the process.
This "apt autoremove" tool is just amazing and works great for me.
Can you get me a question regarding 2 commands?
apt update (checks packages to update)
apt upgrade (installs the packages listed for upgrade)
My question is, is there a command that checks packages to update and immediately asks if I want to install them? Or do I need to do both steps;
1. apt update
2. apt upgrade
Or if I just use "apt upgrade" will I check for updates and prepare to install?
Re: sudo apt autoremove
Posted: Sun Jul 25, 2021 6:59 pm
by seaken64
rmcaetanoalves, The MX Updater does that for you.
To OP, FWIW, I routinely run the autoremove and autoclean commands. But from the command line. If I see something weird I stop the process until I know what is going to be removed. Ask on the forum until you know what is up. And I agree with the comments that it is not necessary with so many bytes of storage now available. But I also have a lot of old machines with limited storage space.
Just learn to do it manually. It should not be a part of the automatic routine, although you can set it up that way if you want.
Seaken64
Re: sudo apt autoremove
Posted: Sun Jul 25, 2021 7:13 pm
by rmcaetanoalves
seaken64 wrote: Sun Jul 25, 2021 6:59 pm
rmcaetanoalves, The MX Updater does that for you.
To OP, FWIW, I routinely run the autoremove and autoclean commands. But from the command line. If I see something weird I stop the process until I know what is going to be removed. Ask on the forum until you know what is up. And I agree with the comments that it is not necessary with so many bytes of storage now available. But I also have a lot of old machines with limited storage space.
Just learn to do it manually. It should not be a part of the automatic routine, although you can set it up that way if you want.
Seaken64
I think I expressed myself wrongly, or you got it wrong.
I'm trying to summarize the entire update and removal process in 2 commands, via the terminal (without the need for the MX Updater)
apt autoremove (to remove unnecessary and obsolete packages)
apt update (check for updates)
apt upgrade (install updates)
I'm trying to find out if there is a way to check for updates and install them (if any) with a single command.
No need to use "apt update" and then "apt upgrade"
an alternative I'm using is;
sudo apt update; sudo apt autoremove; sudo apt upgrade