Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: Complete removal of images and headers

  1. #11
    Join Date
    Aug 2013
    Beans
    4

    Re: Complete removal of images and headers

    Every now and then i run a cleanup in terminal. Below are the commands I use to do that.
    Leave the most recent + the one before, that is a good practice from what I read on this subject.

    uname -r #determine which kernel is currently in use, to make sure you are running the latest and not removing an active one.
    dpkg --list | grep linux-image #list all existing kernels on the system
    sudo apt-get purge linux-image-x.y.zz-aa-generic #type the name of the kernel you want to remove, see the list you generated with the previous command for that

    sometimes the directory in which some of the kernel data resides is not automatically removed.
    ls /lib/modules #to find which kernels still have a folder there
    sudo rm -r /lib/modules/x.x.zz-aa-generic # type the exact name of the folder to be removed. Don't delete the folders for the two kernels you have to keep!
    sudo autoremove
    sudo autoclean
    sudo update-grub # this should run anyway as the last step of the purge-part, but it doesn hurt to do it anyway
    Last edited by jaapz2; July 26th, 2014 at 10:01 PM. Reason: spelling error

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •