Why did 'apt-get autoremove' wreck my system!

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Gannet

Why did 'apt-get autoremove' wreck my system!

Post by Gannet »

After upgrading from XP a couple of months ago I thought I was doing quite well with making things work. Yesterday, whilst playing with Audacity, PulseAudio and ALSA, I innocently ran the command 'sudo apt-get autoremove'. Without looking too carefully i gleefully accepted the recovery of disk space and replied 'y' to the long list.

It has taken me many hours to get back a semblance of functionality. I have just run it again but, this time replying 'n'. This was the output:

Code: Select all

sudo apt-get autoremove
[sudo] password for simon: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  cheese-common gnome-control-center-data gnome-settings-daemon
  gtk2-engines-xfce libcheese-gtk23 libcheese7 libgnome-control-center1
  libgoa-backend-1.0-1 libkeybinder0 librest-0.7-0 libxfce4ui-utils mousepad
  orage ristretto xfburn xfce4-appfinder xfce4-artwork xfce4-battery-plugin
  xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict
  xfce4-diskperf-plugin xfce4-fsguard-plugin xfce4-genmon-plugin
  xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-places-plugin
  xfce4-sensors-plugin xfce4-smartbookmark-plugin xfce4-systemload-plugin
  xfce4-verve-plugin xfce4-wavelan-plugin xfce4-weather-plugin
  xfce4-xkb-plugin
0 to upgrade, 0 to newly install, 35 to remove and 37 not to upgrade.
After this operation, 52.4 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
The "Orage" I am definately using. Most of the "xfce" stuff which I would expect to have available to add to the taskbar should I need them. Shoudn't the 'apt-get autoremove' come with a large health warning?

The first time I ran it, the Orage clock was running on the task bar. Afterwards I realised it that it was no longer there along with the volume control and a few other bits. Is my system broken in some way? It would be nice if I could run it safely as I try stuff and abandon it minutes later in favour of something else.

I have a cobbled together desktop system with a three year old motherboard. I started with Linux Mint 17 and Cinnamon. After encountering the freezing problem I went to xfce4. I still have the Cinnamon installed, although, I suspect some essential bits may have been gobbled up as I haven't used it since the disaster. All is kept up to date, although I have removed the Cinnamon "nightly build" repository. I really like xfce and don't expect

I also did some very successfull work curing the PulseAudio allergy provoked by the xfce mixer. The most difficult part was recovering the volume control in the notification area. There wasn't a lot to help in the posts so I feel I ought to record what I did somewhere but I don't know where best to put it. I don't think I have the authority for doing tutorials yet.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mute Ant

Re: Why did 'apt-get autoremove' wreck my system!

Post by Mute Ant »

I suspect the plot goes as follows...

[1] Installed a meta-package, mint-meta-xfce is my guess, which installs lots of others without you having to choose them.

[2] Removed one of the auto-installed programs. This removes the meta-package too leaving all the others installed but with no owner.

[3] Ran Auto-Remove, which sees a load of automatically-installed packages without an owner and offers to remove them. If you set all your packages to ''manually installed'' you effectively disable this remove-all-depends function.

And it did tell you what was going to happen, and you approved it.
Habitual

Re: Why did 'apt-get autoremove' wreck my system!

Post by Habitual »

Gannet wrote:i gleefully accepted the recovery of disk space and replied 'y' to the long list.
for 52.4 MB disk space? I always "read twice and press <enter> once" and ALWAYS examine the list of package that are going to be removed.
Better yet, stick the list in a .txt file on your hard drive, because you can use it to put things "back".

It's a LOT of work for 52 megs but learning is Priceless.
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: Why did 'apt-get autoremove' wreck my system!

Post by Buzzsaw »

apt-get autoremove is usually a bad idea. It removes all packages that were installed as dependancies for other packages that have since been removed.

The problem with this logic is that often these dependancy packages are wanted in their own right. For example, if I install the DVD-ripping program OGMRip, MPlayer is automatically installed as a dependency. If I later remove OGMRip, MPlayer will remain installed, but will be considered 'autoremovable' by apt. However, I might like using MPlayer in its own right to watch videos. If I subsequently use 'apt-get autoremove', MPlayer will nevertheless be removed, to my annoyance.

By the way, if you make a mistake like the one you've made, you can easily (but laboriously) reverse it by reading:

Code: Select all

/var/log/apt/history.log
which contains a record of all packages installed, removed and upgraded. You can then manually reinstall all of the removed packages.
Ceilidh2

Re: Why did 'apt-get autoremove' wreck my system!

Post by Ceilidh2 »

graeme@graeme-F3E ~ $ /var/log/apt/history.log
bash: /var/log/apt/history.log: Permission denied
graeme@graeme-F3E ~ $

Um, no I can't.
WharfRat

Re: Why did 'apt-get autoremove' wreck my system!

Post by WharfRat »

Ceilidh2 wrote:graeme@graeme-F3E ~ $ /var/log/apt/history.log
bash: /var/log/apt/history.log: Permission denied
graeme@graeme-F3E ~ $

Um, no I can't.
You would probably want to

Code: Select all

cat /var/log/apt/history.log
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: Why did 'apt-get autoremove' wreck my system!

Post by Buzzsaw »

Ceilidh2 wrote:graeme@graeme-F3E ~ $ /var/log/apt/history.log
bash: /var/log/apt/history.log: Permission denied
graeme@graeme-F3E ~ $

Um, no I can't.
You misunderstood what I wrote.

I didn't say to execute '/var/log/apt/history.log' as a command; I simply said to read that file. You can use whatever program you want to read it: nano, cat, less, more, Gedit, Mousepad, etc.
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Why did 'apt-get autoremove' wreck my system!

Post by Spearmint2 »

Buzzsaw wrote:
Ceilidh2 wrote:graeme@graeme-F3E ~ $ /var/log/apt/history.log
bash: /var/log/apt/history.log: Permission denied
graeme@graeme-F3E ~ $

Um, no I can't.
You misunderstood what I wrote.

I didn't say to execute '/var/log/apt/history.log' as a command; I simply said to read that file. You can use whatever program you want to read it: nano, cat, less, more, Gedit, Mousepad, etc.
I'm not sure which is funnier, your reply, or what this other person did to himself. It's like watching someone slip down, you feel bad for them, but it's still funny.

The "cat" command is what gives you the readout. However, that said, I just ran it on my history log and discovered it blank, even though I know I've installed programs myself from package manager. Maybe others with Mint 17 could check and see if history in package manager is working for them?
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Why did 'apt-get autoremove' wreck my system!

Post by all41 »

Spearmint2--I have a log for install of hardinfo earlier today

Code: Select all

 $ cat /var/log/apt/history.log

Start-Date: 2014-10-01  14:56:35
Commandline: apt-get install hardinfo
Install: hardinfo:amd64 (0.5.1-1.2ubuntu4)
End-Date: 2014-10-01  14:56:41

Everything in life was difficult before it became easy.
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Why did 'apt-get autoremove' wreck my system!

Post by Spearmint2 »

all41 wrote:Spearmint2--I have a log for install of hardinfo earlier today

Code: Select all

 $ cat /var/log/apt/history.log

Start-Date: 2014-10-01  14:56:35
Commandline: apt-get install hardinfo
Install: hardinfo:amd64 (0.5.1-1.2ubuntu4)
End-Date: 2014-10-01  14:56:41


http://forums.linuxmint.com/viewtopic.p ... 01#p931301

Thanks. I just ran my log file viewer and discovered this. I have no idea how this happened, what caused it, especially since any changes should be in log. I guess I'll have to make new blank log files to replace those missing.
MissingLogs.png
Excuse my distraction with my own problem, and hopefully Gannet comes back with some feedback on how things go with him and his.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Locked

Return to “Beginner Questions”