When installing packages, the OS suggests using autoremove to remove some packages that are no longer used. Is this a good thing to do? Always worried it's going to remove something I need. Also hearing that I should remove old kernels, keeping only the last 2. Should/how I do this?
Announcement
Collapse
No announcement yet.
apt-get autoremove - dangerous?
Collapse
This topic is closed.
X
X
-
you will get differing opinions on this Q.
I dont use the autoremove option because I'm never sure if there realy not used ,,,,,LOL and I have lots of space (relatively)
I do remove/purge old kernels-headers-modules as thay do use a bit of space (combined)
I will open muon package manager (one of the few things I still use it for) ((not muon software center)) and hand pick the kernel versions I want to PURGE and the headers and modules for eatch ver. of kernel .
purge will remove the .config's for all these ,,,,,,,remove will not .
I am about to do just that right now as a mater of fact .
these
Code:vinny@vinny-Bonobo-Extreme:~$ ls /boot | grep vm [COLOR=#ff0000]vmlinuz-3.13.0-32-generic vmlinuz-3.13.0-37-generic vmlinuz-3.13.0-39-generic vmlinuz-3.13.0-40-generic[/COLOR] vmlinuz-3.13.0-43-generic vmlinuz-3.13.0-44-generic
VINNYi7 4core HT 8MB L3 2.9GHz
16GB RAM
Nvidia GTX 860M 4GB RAM 1152 cuda cores
- Top
- Bottom
-
Looks like I only have 2 old kernels at this point. Need to get better with grep, any suggested reading? I have The Linux Command Line by William E Shotts jr, copyright 2012 and Linux Bible 8th edition also 2012. So, they're not too out of date, I guess.Last edited by vsreeser; Jan 17, 2015, 10:15 PM.
- Top
- Bottom
Comment
-
Originally posted by vsreeser View PostLooks like I only have 2 old kernels at this point. Need to get better with grep, any suggested reading? I have The Linux Command Line by William E Shotts jr, copyright 2012 and Linux Bible 8th edition also 2012. So, they're not too out of date, I guess.
OK
just purged all the old kernels .........
muon left pane filter by status>"autoremovable" start at bottom of list and select purge for each one
this freed 1GB of space .
nowCode:vinny@vinny-Bonobo-Extreme:~$ ls /boot | grep vm vmlinuz-3.13.0-43-generic vmlinuz-3.13.0-44-generic vinny@vinny-Bonobo-Extreme:~$
i7 4core HT 8MB L3 2.9GHz
16GB RAM
Nvidia GTX 860M 4GB RAM 1152 cuda cores
- Top
- Bottom
Comment
-
Space is not a problem. Only using 7% of my linux drive (1 Tb). Anything that boosts performance, I will try though. Before I make any changes that may blow up the system, I use clonezilla to make an image of the drive on a partition that I don't mount in Linux or Windows. Must be an easier and faster way to do this though. Full image takes a while, even though very little space is used. Tried PING, it failed. Just want a full image I can restore if I blow things up
- Top
- Bottom
Comment
-
in 5 years of using Kubuntu I have never backed up anything ,,,,,,(my bad) so I do not know mutch about it ,,,,,,,,but
http://askubuntu.com/questions/2596/...f-backup-tools
and
https://help.ubuntu.com/community/BackupYourSystem
look like good places to start.
start a new thread for this and/or search in the forum (I believe it has been discussed before)
VINNYi7 4core HT 8MB L3 2.9GHz
16GB RAM
Nvidia GTX 860M 4GB RAM 1152 cuda cores
- Top
- Bottom
Comment
-
Vinny, I'm still not really clear on removing old kernels (though I've been doing it through Muon, so it seems). The posts on it are not all consistent.
Is this statement true:
... for every kernel that you don't want anymore, remove the following three files:
linux-headers-<version>
linux-headers-<version>-generic
linux-image-<version>-generic
Ex.:
linux-headers-2.6.32-23
linux-headers-2.6.32-23-generic
linux-image-2.6.32-23-genericAn intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski
- Top
- Bottom
Comment
-
off topic but could not resist.
Originally posted by vsreeser View PostAnything that boosts performance, I will try though.
The next step would be to buy a bigger SSD and put everything on it and just use your 1TB for audio/video/backup.
I had my kubuntu install on a 29 GB SSD for a long time.Last edited by anika200; Jan 18, 2015, 07:11 AM.
- Top
- Bottom
Comment
-
Originally posted by Qqmike View PostVinny, I'm still not really clear on removing old kernels (though I've been doing it through Muon, so it seems). The posts on it are not all consistent.
Is this statement true:
... for every kernel that you don't want anymore, remove the following three files:
linux-headers-<version>
linux-headers-<version>-generic
linux-image-<version>-generic
Ex.:
linux-headers-2.6.32-23
linux-headers-2.6.32-23-generic
linux-image-2.6.32-23-generic
If that is true, then ... for each version (e.g., for 2.6.32-23), which ONE of those do you highlight in Muon to purge?
if you look at the screenshot you will see (ok so it is hard to read that tiny text) their is allso a ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Linux-image-extra<version>generic
this has all the extra modules(drivers) and is about 150MB in size by it's self
it seams that when you select the filter "by status>auto-removable" it will not list the newest 2 kernels (thats good)
I sead to start at the bottom of the list to start selecting them for purge because it seems that if you select linux-headers<version> for purge , then linux-headers<version>generic muon wont offer purge as an option ,,,,,,,,,you half to select the "generic" for purge first .i7 4core HT 8MB L3 2.9GHz
16GB RAM
Nvidia GTX 860M 4GB RAM 1152 cuda cores
- Top
- Bottom
Comment
-
As Vinny said, you will get different opinions on this.
I let auto-remove remove old kernels, AFTER confirming the 'keep last 2 kernels' bit is working. In other words, I run an 'ls /boot' and check that what auto-remove is going to do is sane.
See the '01autoremove-kernels' file in /etc/apt/apt.conf.d if you are interested in where the 'keep last 2' magic happens.
The books you mentioned are probably valuable and worth reading. However, they may not cover something like this that is both package management specific (apt, not rpm or pacman, etc.) and possibly distro-specific (not sure if removing old kernels is a Debian thing or an Ubuntu thing, or a Debian thing that Ubuntu implements in a slightly different way than 'stock Debian').
- Top
- Bottom
Comment
-
I always let autoremove do its magic. It keeps cruft off of my system. In the nearly six years I've been using Kubuntu I have never had autoremove cause a problem."A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
– John F. Kennedy, February 26, 1962.
- Top
- Bottom
Comment
-
dose then "autoremove" with out purge remove the configs , system map's initrd.img's as well ?
the initrd.img is 25MB each .
yes I know you can runCode:sudo apt-get autoremove --purge
if you do not add the --purge to the autoremove you can get left with a lot of cruft after some time .
VINNYi7 4core HT 8MB L3 2.9GHz
16GB RAM
Nvidia GTX 860M 4GB RAM 1152 cuda cores
- Top
- Bottom
Comment
-
Autoremove won't delete config files, but if you look at what is being uninstalled is most often unused library files, and those won't have that anyway.
Actually, for those packages that have uninstall (postrm) scripts, those will be run as they would in any removal , so the initrd, update-grub etc for kernels is run.Last edited by claydoh; Jan 18, 2015, 05:23 PM.
- Top
- Bottom
Comment
-
Originally posted by claydoh View PostAutoremove won't delete config files, but if you look at what is being uninstalled is most often unused library files, and those won't have those anyway.
Actually, for those packages that have uninstall (postrm) scripts, those will be run as they would in any removal , so the initrd, update-grub etc for kernels is run.
I never used just the remove option wile removing Kernels.
VINNYi7 4core HT 8MB L3 2.9GHz
16GB RAM
Nvidia GTX 860M 4GB RAM 1152 cuda cores
- Top
- Bottom
Comment
Comment