How to remove old kernels

From Paldo

(Difference between revisions)
Jump to: navigation, search
Revision as of 09:00, 13 March 2008 (edit)
Amnon82 (Talk | contribs)

← Previous diff
Revision as of 02:48, 22 May 2010 (edit) (undo)
Subgoo (Talk | contribs)
m (Easier way to remove old kernels)
Next diff →
Line 58: Line 58:
== Easier way to remove old kernels == == Easier way to remove old kernels ==
-Open a terminal and enter those codes:+Open a terminal and enter this code:
sudo rm -v /var/lib/upkg/packages/*-2.6.*paldo*.select sudo rm -v /var/lib/upkg/packages/*-2.6.*paldo*.select

Revision as of 02:48, 22 May 2010

Trick by Philip Miller


Backup menu.lst

First you have to backup the menu.lst. For that open a terminal and enter followed code:

   sudo cp /boot/grub/menu.lst /boot/grub/menu.backup

Removing old kernels

Then enter followed code into the terminal:

Attention: Replace KERNELVERSION by the version of your old kernel you want to remove. Keep the stars in the line!!!


     ls /var/lib/upkg/packages/*KERNELVERSION-p*x86 | sed 's\/var/lib/upkg/packages/\sudo upkg-remove --force --verbose \g'


     ls /var/lib/upkg/packages/*KERNELVERSION-p*x86_64 | sed 's\/var/lib/upkg/packages/\sudo upkg-remove --force --verbose \g'

Copy/Paste the outputted code if you want to remove the packages.


     sudo upkg-remove --force --verbose gspcav1-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose linux-2.6-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose lirc-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose madwifi-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose ndiswrapper-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose nvidia-glx-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose nvidia-glx-71xx-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose nvidia-glx-96xx-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose uvcvideo-2.6.24-paldo1-x86
     sudo upkg-remove --force --verbose VirtualBox-2.6.24-paldo1-x86

Check menu.lst

If you remove the first kernel ever installed on your paldo-system the menu.lst gets blanked out. Open the saved backup with:

   sudo gedit /boot/grub/menu.backup

Remove not longer needed kernel lines and save it as menu.lst

Sample Grub entry

If you didn't saved your menu.lst file, here is a sample menu.lst entry:

   title paldo testing (linux
   kernel /boot/linux- root=/dev/sda9 resume=/dev/sda2 vga=0x317
   initrd /boot/initramfs-

Easier way to remove old kernels

Open a terminal and enter this code:

  sudo rm -v /var/lib/upkg/packages/*-2.6.*paldo*.select
  sudo upkg-upgrade

First all old kernel modules got marked for deinstallation, except the actual one. Via the upgrade all old kernel-modules got deinstalled.

Personal tools