|
Linux Training 1825 Monetary Lane Suite #104 Carrollton, TX Do a presentation at NTLUG. What is the Linux Installation Project? Real companies using Linux! Not just for business anymore. Providing ready to run platforms on Linux |
Created by Terry Henderson on June 24, 2008, at 03:55 PM ...[for Ubuntu] To see what kernel you're running now: uname -a
(This will tell us which one NOT to remove.) *Updates in bold type
I have sense realized that the command line method has issues, if you use it you need to add --purge to the remove command. To get list of installed apps on a Debian or Ubuntu system: ls /var/lib/dpkg/info
To see what kernels have been installed: ls /var/lib/dpkg/info/linux-image*
It seems that the above command sometimes shows more linux-image entries than you actually have installed, but maybe it's because I failed to use the --purge switch at first. Not sure... To remove all packages that start with name "linux-image-2.6.20-16" sudo apt-get remove linux-image-2.6.20-16*
Again, if you DO need to use the commandline method add the --purge switch, like so: sudo apt-get remove --purge linux-image-2.6.20-16*
Not only will it uninstall the 2.6.20-16 kernel, but it will also make the appropriate changes to /etc/grub/menu.lst (Im my case, I'm running kernel 2.6.22-14 and I just removed the 2.6.20-16 kernel.)
For those that prefer GUI methods, just fire up the package manager front end, symantec, and search for linux-image and then choose to uninstall the unwanted entries. From personal experience, I now see that the GUI method is the preferred method. By all means, use Synaptic Package Manager and select option "Mark for Complete Removal" [Fedora / RedHat / CentOS]: uname -a
To see what kernels are installed: rpm -qa |grep kernel
To remove old kernel: rpm -e kernel-2.6.18-1.2798.fc6.i586
Or: yum remove kernel-2.6.18-1.2798.fc6.i586
Or: yum erase kernel-2.6.18-1.2798.fc6.i586
Either command should do the trick. RedHat / Fedora's GUI package manager can also be used to remove unwanted kernels. Back to Site Blogs |