sudo apt autoremove

Message
Author
User avatar
asqwerth
Developer
Posts: 7231
Joined: Sun May 27, 2007 5:37 am

Re: sudo apt autoremove

#11 Post 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).
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
dolphin_oracle
Developer
Posts: 20012
Joined: Sun Dec 16, 2007 1:17 pm

Re: sudo apt autoremove

#12 Post 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.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

MXRobo
Posts: 1524
Joined: Thu Nov 14, 2019 1:09 pm

Re: sudo apt autoremove

#13 Post by MXRobo »

dolphin_oracle wrote: Sun Jul 04, 2021 10:32 am
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. :grin:

But, in THIS post, I am not advocating for a warning – just showing my initial, and others possible interpretations.
Have a nice day. :happy:

User avatar
dolphin_oracle
Developer
Posts: 20012
Joined: Sun Dec 16, 2007 1:17 pm

Re: sudo apt autoremove

#14 Post 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
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Ironfighter
Posts: 270
Joined: Tue May 07, 2019 4:45 am

Re: sudo apt autoremove

#15 Post 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?
"To achieve the greatest result, seek the quintessential"
General Shi Jue, late president of the Tai Chi Chuan Society of the Republic of China

User avatar
dolphin_oracle
Developer
Posts: 20012
Joined: Sun Dec 16, 2007 1:17 pm

Re: sudo apt autoremove

#16 Post 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.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Ironfighter
Posts: 270
Joined: Tue May 07, 2019 4:45 am

Re: sudo apt autoremove

#17 Post 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👍
"To achieve the greatest result, seek the quintessential"
General Shi Jue, late president of the Tai Chi Chuan Society of the Republic of China

rmcaetanoalves
Posts: 5
Joined: Sat Jun 26, 2021 9:46 am

Re: sudo apt autoremove

#18 Post 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?

User avatar
seaken64
Posts: 819
Joined: Wed Jan 02, 2019 2:43 pm

Re: sudo apt autoremove

#19 Post 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
MX21-64 XFCE & W11 on Lenovo 330S LT. MX21-KDE & MX21-XFCE on Live USB.
MX18-64 & W7, Fedora on HP Core2 DT
MX21-32 XFCE w/ MX-Fluxbox on P4HT DT w/ antiX21, SUSE Tumbleweed, Q4OS, WXP
antiX21 on Compaq PIII 1 Ghz DT, w/ Debian, MX18FB, W2K

rmcaetanoalves
Posts: 5
Joined: Sat Jun 26, 2021 9:46 am

Re: sudo apt autoremove

#20 Post 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

Locked

Return to “Package Requests/Status - MX 17/18”