Not sure where I got this but, I think it is a handy way to keep track of your kernels.
When I get a new kernel install I copy it from the terminal and past it to a gedit file. I name the file kernel cmds for Raring (or whatever version I am on). So I can find it easily in
When I enter sudo apt-get update && sudo apt-get upgrade and see files that will be installed and also see this:
Code:
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
After I install the updates I enter sudo apt-get dist-upgrade to install the kernel but before I press "Y" to install it I first copy the file names (in red) and paste them to the gedit file.
Code:
The following NEW packages will be installed:
linux-headers-3.8.0-18 linux-headers-3.8.0-18-generic linux-image-3.8.0-18-generic linux-image-extra-3.8.0-18-generic
The following packages will be upgraded:
linux-generic linux-headers-generic linux-image-generic
3 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 56.4 MB of archives.
After this operation, 235 MB of additional disk space will be used.
Do you want to continue [Y/n]?
While pasting the file names into the gedit text file I put "sudo apt-get purge" before each line for later use.
So then I delete any I have besides the last 2 kernels.
Here is what my text file looks like for Raring:
Code:
sudo apt-get purge linux-headers-3.8.0-9 linux-headers-3.8.0-9-generic linux-image-3.8.0-9-generic linux-image-extra-3.8.0-9-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-10 linux-headers-3.8.0-10-generic linux-image-3.8.0-10-generic linux-image-extra-3.8.0-10-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-11 linux-headers-3.8.0-11-generic linux-image-3.8.0-11-generic linux-image-extra-3.8.0-11-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-12 linux-headers-3.8.0-12-generic linux-image-3.8.0-12-generic linux-image-extra-3.8.0-12-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-13 linux-headers-3.8.0-13-generic linux-image-3.8.0-13-generic linux-image-extra-3.8.0-13-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-14 linux-headers-3.8.0-14-generic linux-image-3.8.0-14-generic linux-image-extra-3.8.0-14-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-15 linux-headers-3.8.0-15-generic linux-image-3.8.0-15-generic linux-image-extra-3.8.0-15-generic - deleted.
sudo apt-get purge linux-headers-3.8.0-16 linux-headers-3.8.0-16-generic linux-image-3.8.0-16-generic linux-image-extra-3.8.0-16-generic
sudo apt-get purge linux-headers-3.8.0-17 linux-headers-3.8.0-17-generic linux-image-3.8.0-17-generic linux-image-extra-3.8.0-17-generic
sudo apt-get purge linux-headers-3.8.0-18 linux-headers-3.8.0-18-generic linux-image-3.8.0-18-generic linux-image-extra-3.8.0-18-generic
linux-image-generic linux-generic linux-headers-generic
(The last 2 files are just part of the kernel but, I don't touch them unless I have deleted the last kernel and need to reinstall it which I do not recommend)
So, I have just installed the 3.8.0-18 kernel and will reboot. Then I will come back and delete the 3.8.0-16 kernel with the above line and copy and paste the - deleted part and save it.
Then to make it even simpler I have these aliases that do the above commands called ud and ud2. Someone in this forum told me how to do this:
gksu gedit ~/.bashrc
Then copy the blue lines after the others (the others are around line 87).
Code:
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# update aliases
alias ud='sudo apt-get update && sudo apt-get upgrade && sudo apt-get clean'
alias ud2='sudo apt-get dist-upgrade'
Then all you have to do is enter ud and your password in terminal to get your updates and if anything is held back enter ud2.
Doing it this way you never have to worry about partial upgrades because if it is not ready to install it will still say The following packages have been kept back:
Here is what my text file looks like for Quantal:
Code:
sudo apt-get purge linux-headers-3.5.0-25 linux-headers-3.5.0-25-generic linux-image-3.5.0-25-generic linux-image-extra-3.5.0-25-generic - deleted.
sudo apt-get purge linux-headers-3.5.0-26 linux-headers-3.5.0-26-generic linux-image-3.5.0-26-generic linux-image-extra-3.5.0-26-generic
sudo apt-get purge linux-headers-3.5.0-27 linux-headers-3.5.0-27-generic linux-image-3.5.0-27-generic linux-image-extra-3.5.0-27-generic
Here is what my text file looks like for Precise (notice there are only 3 kernel files for Precise):
Code:
sudo apt-get purge linux-headers-3.2.0-37 linux-headers-3.2.0-37-generic linux-image-3.2.0-37-generic - purged.
sudo apt-get purge linux-headers-3.2.0-38 linux-headers-3.2.0-38-generic linux-image-3.2.0-38-generic - purged.
sudo apt-get purge linux-headers-3.2.0-39 linux-headers-3.2.0-39-generic linux-image-3.2.0-39-generic
sudo apt-get purge linux-headers-3.2.0-40 linux-headers-3.2.0-40-generic linux-image-3.2.0-40-generic
Here is my Mint 14 Nadia kernel file which is identical to the Quantal one, which Mint 14 is based on:
Code:
sudo apt-get purge linux-headers-3.5.0-26 linux-headers-3.5.0-26-generic linux-image-3.5.0-26-generic linux-image-extra-3.5.0-26-generic
sudo apt-get purge linux-headers-3.5.0-27 linux-headers-3.5.0-27-generic linux-image-3.5.0-27-generic linux-image-extra-3.5.0-27-generic
PS: Thank you forum auto save feature!!! I clicked the top close button to close the text file and since my Raring is finicky about the buttons when maximized, it closed Firefox.
I thought I lost everything but, then I remembered how it auto saved the data periodically.
I found "start a new thread" in my history and clicked on it but it was empty. then I seen at the bottom "restore autosaved data" or something similar and viola it all came back.
Bookmarks