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

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Gannet
Level 1
Level 1
Posts: 12
Joined: Mon Aug 25, 2014 2:21 pm

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

Post by Gannet » Mon Sep 29, 2014 3:03 pm

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.

Mute Ant
Level 14
Level 14
Posts: 5135
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

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

Post by Mute Ant » Mon Sep 29, 2014 3:48 pm

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.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

Habitual
Level 13
Level 13
Posts: 4870
Joined: Sun Nov 21, 2010 8:31 pm
Location: 0.0.0.0

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

Post by Habitual » Mon Sep 29, 2014 3:57 pm

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: 1308
Joined: Sat Aug 23, 2014 12:53 pm

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

Post by Buzzsaw » Mon Sep 29, 2014 8:19 pm

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
Level 4
Level 4
Posts: 281
Joined: Thu Apr 17, 2014 10:29 pm
Location: Thames, New Zealand

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

Post by Ceilidh2 » Tue Sep 30, 2014 11:40 pm

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

Um, no I can't.
"Take it easy, but take it." Woody Guthrie

User avatar
WharfRat
Level 21
Level 21
Posts: 13072
Joined: Thu Apr 07, 2011 8:15 pm

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

Post by WharfRat » Wed Oct 01, 2014 12:04 am

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
ImageImage

Buzzsaw
Level 6
Level 6
Posts: 1308
Joined: Sat Aug 23, 2014 12:53 pm

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

Post by Buzzsaw » Wed Oct 01, 2014 2:48 pm

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: 6128
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

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

Post by Spearmint2 » Wed Oct 01, 2014 4:28 pm

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,....

all41
Level 15
Level 15
Posts: 5560
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

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

Post by all41 » Wed Oct 01, 2014 4:33 pm

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


User avatar
Spearmint2
Level 16
Level 16
Posts: 6128
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

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

Post by Spearmint2 » Wed Oct 01, 2014 4:40 pm

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
Missing Log Files
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,....

Post Reply

Return to “Newbie Questions”