LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-28-2023, 05:57 PM   #1
jcmahne
Member
 
Registered: Nov 2010
Posts: 43

Rep: Reputation: 3
APT autoremove question


I have Linux Mint 19.3 on the PC. I did a general upgrade as recommended by the Update Manager ( that was yesterday, January 28 2023). WINE was upgraded too from version 7.0 to 8.0, and the new version gave me trouble .
I removed it and after I removed it , I did apt autoclean followed by apt autoremove in the terminal. I ran APT check as well and there were no issues.I have done this many times before with no problems.When I booted up again, I could no longer boot into the GUI and startx did not work either. I then had to restore from a Timeshift backup via the terminal.
I'm no longer confident using autoremove. Has anyone ever had this problem too?
 
Old 01-28-2023, 08:43 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,817
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
As I hope you know, Mint is based upon *buntu, which in turn is based upon Debian. Just today I finished cleaning up a very similar problem with an upgrade from Ubuntu 20.04 to 22.04. The need for the linux-modules-extra package was somehow removed in preparation to begin the upgrade, resulting in the 22.04 kernel's installation not including it. Either I didn't notice, or I caused it intentionally but forgot. It's the source for nouveau.ko, the absence of which forces FOSS NVidia graphics into fallback mode. It also stopped the kernel from finding my NIC, and thus there was no network. Because it is on a multiboot machine, I was able to easily boot Debian in order to fetch the correct linux-modules-extra package directly off a mirror and save it on the Ubuntu / filesystem so that I could install it. The process of installing it and rebuilding the initrd also brought networking back, so I never needed to determine why networking had failed. Autoremove is a good tool, but not perfect. It helps to eagle eye its list of what it proposes to remove before answering y. When in doubt, answer n, and either remove the individual packages manually, or find a way to prevent what needs to be kept from being included in the list to remove. I chose the manual route, so the affected .bash_history file on that installation currently holds about 200 lines that include the string purge. Or use timeshift, which I have never enabled on anything. Using something so easy makes it harder to learn from mistakes.
 
Old 01-28-2023, 08:57 PM   #3
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I use apt autoremove all the time.

Not sure if this is still the case but Debian and some Ubuntu, maybe all of them don't have a "Install limit" for kernels. For those with a separate boot partition, many times the small partition gets plugged with excess backup kernels that they can't finish applying updates at the rebuilding of initramfs stage and the update process pukes and you can't boot from the incomplete initramfs because there was not enough space. Not to mention, the update process takes a lot more time to complete with 8 kernels since it appears every initramfs that exist get's rebuilt when adding/removing a kernel.

Using autoremove after every second or third round of updates keeps a set kernel limit.

I have never had a negative experience with autoremove, in the past I never used it and my Debian testing which is always changing would always get obese, not very stable or quick in that shape, autoremove keeps it a little more slim and fit.
 
1 members found this post helpful.
Old 01-28-2023, 09:50 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,817
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Quote:
Originally Posted by Brains View Post
it appears every initramfs that exist get's (sic) rebuilt when adding/removing a kernel.
This is configurable via update_initramfs= in /etc/initramfs-tools/update-initramfs.conf.
 
Old 01-28-2023, 10:34 PM   #5
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by mrmazda View Post
This is configurable via update_initramfs= in /etc/initramfs-tools/update-initramfs.conf.
Not something apt will tell you at the command line. However, seems lately apt now tells you when there are packages no longer needed and use autoremove to remove them.

The information you provide is not exactly common knowledge but nice to know for sure.
The RPM junkies have "install-limit" or similar set to 3 in /etc/dnf/dnf.conf, no need to wait till your system can't boot because there is no set default like in Debian types with plugged boot partitions.
Would be nice if this was automatically set like dnf.
 
1 members found this post helpful.
Old 01-29-2023, 06:11 AM   #6
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
I am completely satisfied with autoremove.
The trouble here is Wine on Mint and a new problem with current install-packages. People with knowledge of the distribution should be able to help or to direct.
 
Old 01-29-2023, 08:34 AM   #7
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Along with reading the list of proposed actions prior to accepting, it's probably also worth finding out what autoremove actually does.
https://manpages.ubuntu.com/manpages...an8/apt.8.html
 
Old 01-29-2023, 06:52 PM   #8
jcmahne
Member
 
Registered: Nov 2010
Posts: 43

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Michael Uplawski View Post
I am completely satisfied with autoremove.
The trouble here is Wine on Mint and a new problem with current install-packages. People with knowledge of the distribution should be able to help or to direct.
It does seem like a WINE on mint/ubuntu/debian problem in my case. Other users have had this problem too. Autoremove can create problems and not only because of a WINE removal, and I don't trust "APT check" now either. I'll post it as a bug on the WINE site, although I don't think there will be a response to it.
Here is a link for someone who had my experience:
https://askubuntu.com/questions/7202...move-dangerous
 
Old 01-29-2023, 07:17 PM   #9
jcmahne
Member
 
Registered: Nov 2010
Posts: 43

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Michael Uplawski View Post
I am completely satisfied with autoremove.
The trouble here is Wine on Mint and a new problem with current install-packages. People with knowledge of the distribution should be able to help or to direct.
There are also some who have had my failure on a MATE desktop version of mint, which is what I use. A gui failure.Possibly it's something not only related to WINE removal, but to removing it on a MATE desktop machine.
Next time I'll use : "apt autoremove --dry-run" first, and pay close attention to desktop packages.I don't know them, but will have to find out what they are.
 
Old 02-02-2023, 04:29 PM   #10
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Have a look at /var/log/apt/history.log or history.log.1.gz
It details what was removed, you may spot something prompting you to reinstall a package that may fix the issue. The log is well detailed as in my log example below:
Quote:
Start-Date: 2023-01-10 22:36:19
Commandline: apt autoremove
Requested-By: jo (1000)
Remove: libserd-0-0:amd64 (0.30.10-2), libcodec2-1.0:amd64 (1.0.1-3), librubberband2:amd64 (2.0.0-2), libzvbi-common:amd64 (0.2.35-19), va-driver-all:amd64 (2.14.0-1), linux-image-5.15.0-43-generic:amd64 (5.15.0-43.46), chromium-codecs-ffmpeg-extra:amd64 (1:85.0.4183.83-0ubuntu2),.....
 
1 members found this post helpful.
Old 02-03-2023, 01:07 AM   #11
jcmahne
Member
 
Registered: Nov 2010
Posts: 43

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Brains View Post
Have a look at /var/log/apt/history.log or history.log.1.gz
It details what was removed, you may spot something prompting you to reinstall a package that may fix the issue. The log is well detailed as in my log example below:
Good tip thank you.
 
Old 04-05-2023, 11:25 AM   #12
Andy-1
Member
 
Registered: Jan 2023
Posts: 202

Rep: Reputation: 14
I have used sudo apt autoremove extensively with Debian based Antix22 LXDE and Loc-OS without any problems – it has been most useful in keeping my system minimal after using Synaptic to fully remove apps or packages.
At times it notifies me and lists “file or folder was not empty so was not deleted”
At this stage I would not wish to use Bleachbit to force the issue or delete the individual items under sudo command.

I still do not know how to list unused packages such as firmware specific to hardware I do not have – perhaps another topic…?
 
Old 04-05-2023, 11:40 AM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,354

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Most of the time autoremove works without any problems, however I also have had a few times, far and inbetween, where autoremove removed more that it should have resulting in a broken system.
 
Old 04-06-2023, 11:03 AM   #14
Andy-1
Member
 
Registered: Jan 2023
Posts: 202

Rep: Reputation: 14
Quote:
Originally Posted by colorpurple21859 View Post
.... where autoremove removed more that it should have resulting in a broken system.
Was your system so broken that you could not run sudo apt update..?
Would this have repaired your system as it would have recognised the broken package?
 
Old 04-06-2023, 11:10 AM   #15
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,354

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
Was your system so broken that you could not run sudo apt update..?
No, the one time I remembered I had the same problem as the op and had to reinstall a few packages to get X to work again, I don't remember the details, just remember it happening.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get autoremove whittycat Debian 5 09-22-2009 02:13 AM
apt-get autoremove cccc Debian 2 07-26-2009 02:55 PM
apt-get autoremove, LIES!! BigglesPiP Debian 18 01-24-2009 11:22 AM
Significant change caused by apt-get-autoremove, new package, or full disk- which? sonichedgehog Debian 0 02-06-2008 06:36 PM
"apt-get autoremove" in Debian Etch/Sid available? deepclutch Debian 1 12-27-2006 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration