Announcement

Collapse
No announcement yet.

How to delete old config, initrd, vmcoreinfo and vmlinuz files?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to delete old config, initrd, vmcoreinfo and vmlinuz files?

    Since I've been doing dist-upgrades every other day or so since JJ alpha 4, I'm getting a fair number of old files in the /boot directory. What can I do to get rid of them? (Not that they take all that much space, but they do all show up in the Grub menu also.)

    I know I found a discussion of this somewhere, but I can't find it any more. I think it recommended using Synaptic to uninstall them. But the current recommendation for JJ is to NOT use Synaptic, but do all upgrades with apt.

    So what to do? Thanks in advance.
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Re: How to delete old config, initrd, vmcoreinfo and vmlinuz files?

    You can safely remove unneeded (old) kernel images with synaptic, the kernel image packages are called 'linux-image-<version>'.

    If you wish to use apt instead, you can get a list of installed kernel with, for example:
    Code:
    dpkg-query -l "linux-image-[0-9]*" | grep -e "^ii"
    and you can uninstall unneeded ones with:
    Code:
    sudo apt-get purge <packagename>
    just be careful you don't remove your newest (running) kernel package.

    Comment


      #3
      Re: How to delete old config, initrd, vmcoreinfo and vmlinuz files?

      Originally posted by kubicle
      ...

      If you wish to use apt instead, you can get a list of installed kernel with, for example:
      Code:
      dpkg-query -l "linux-image-[0-9]*" | grep -e "^ii"
      and you can uninstall unneeded ones with:
      Code:
      sudo apt-get purge <packagename>
      just be careful you don't remove your newest (running) kernel package.
      Running

      sudo apt-get purge linux-image-2.6.28-9-generic

      I got the message

      The link /initrd.img.old is a damaged link
      Removing symbolic link initrd.img.old
      you may need to re-run your boot loader[grub]

      What do I do? I wonder if this is because I started by deleting 2.6.28-9 and not 2.6.28-6 or 2.6.28-8. Should I have done them in order?

      When deleting 2.6.28-6, I was told that the directory

      /lib/modules/2.6.28-6-generic was not empty

      so it didn't delete it. What to do about that?

      I'm afraid to re-boot if Grub might not work. I notice in /boot/grub/menu.lst that the entries for 2.6.28-6 are still there, altho no files for that level are present in /boot.

      Thanks for your advice.
      'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

      Comment


        #4
        Re: How to delete old config, initrd, vmcoreinfo and vmlinuz files?

        Originally posted by joneall
        The link /initrd.img.old is a damaged link
        Removing symbolic link initrd.img.old
        you may need to re-run your boot loader[grub]
        The symbolic link was removed because the (old) initrd image it linked to was removed. Kubuntu's grub setup doesn't even use these links and refers directly to the images. Should not be an issue.

        Should I have done them in order?
        Doesn't matter

        When deleting 2.6.28-6, I was told that the directory

        /lib/modules/2.6.28-6-generic was not empty

        so it didn't delete it. What to do about that?
        For some reason the uninstall script was unable to clear the contents of the module directory and didn't delete the directory because of that. You can safely delete it manually as your newer kernel has it's own directory.

        Comment

        Working...
        X