Announcement

Collapse
No announcement yet.

how to get rid of old kernels?

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

    how to get rid of old kernels?

    ...and I know you are going to say "sudo apt-get autoremove" or something similar. Won't work. I've tried them simplest ones.

    Here's the catch: There is no space left on device, and it keeps saying that I should manually run "sudo dpkg --configure -a". Doesn't work.

    I cannot open Synaptic nor Adept nor add/remove.. Keeps saying either that "some other application is using it, propably adept, apt-get or aptitude" (even though that is not the case) or it just says "You must manually run dpkg --configure -a." Which I already said, doesn't work.

    I think the problem is that there really isn't any space left on device to do anything normal. So, what to do to free some disk space?

    And yes, I tried to find the answer to this from all over.

    I have a Hardy Heron 8.04.


    #2
    Re: how to get rid of old kernels?

    Check my how-to, I think I put the standard measures in there, try Section 7, SECTION 7 Disk/Partition Full! Warning! What to do about it

    -- Privacy Cleanup 101
    http://kubuntuforums.net/forums/inde....msg115011#new
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: how to get rid of old kernels?

      Ok. Thanks. Did some of the cleaning out, and then used "df" and it gave:

      Filesystem 1K-blocks Used Available Use% Mounted on
      /dev/sda3 76481160 61727372 10899324 85% /
      varrun 257784 180 257604 1% /var/run
      varlock 257784 0 257784 0% /var/lock
      udev 257784 64 257720 1% /dev
      devshm 257784 0 257784 0% /dev/shm
      lrm 257784 40000 217784 16% /lib/modules/2.6.24-25-generic/volatile
      /dev/sda1 56637 55541 0 100% /boot

      As you can see, no space to do anything, clearing the sda3 won't help, it's the sda1 that troubles.

      Comment


        #4
        Re: how to get rid of old kernels?

        Somethings odd because if you can boot - opening synaptic wouldn't need space on /boot (I think).

        The answer to your question is:

        -rw-r--r-- 1 root root 634929 16.04.2010 04:32 abi-2.6.32-21-generic
        -rw-r--r-- 1 root root 110365 16.04.2010 04:32 config-2.6.32-21-generic
        -rw-r--r-- 1 root root 8586840 11.05.2010 08:15 initrd.img-2.6.32-21-generic
        -rw-r--r-- 1 root root 2152657 16.04.2010 04:32 System.map-2.6.32-21-generic
        -rw-r--r-- 1 root root 1336 16.04.2010 04:35 vmcoreinfo-2.6.32-21-generic
        -rw-r--r-- 1 root root 4037888 16.04.2010 04:32 vmlinuz-2.6.32-21-generic

        This is the complete list of kernel files in /boot. Assuming you have more than one installed, removing one set of these will give you some space on /boot. Of course, you'll need to update and clean up after to remove the now broken packages.

        FYI: /boot with grub-pc and two kernels (the absolute minimum IMO) takes 76mb. I wouldn't even try to run a separate /boot without at least 200mb, and I usually use 400mb.

        Please Read Me

        Comment


          #5
          Re: how to get rid of old kernels?

          I don't know if you're trying to avoid install software or not, but I just use Ubuntu-Tweak for this. In the package cleaner section, there's an option for kernel clean up as well. Works like a charm. http://ubuntu-tweak.com/

          Comment


            #6
            Re: how to get rid of old kernels?

            I don't know about allthat, but someone said to use Konsole and write "sudo dolphin".
            After that I was able to remove the kernels I don't need, and behold, freed disk space
            Only 85% used now.
            So now I'll just try to make it work better.
            I'll be back if it didn't help.

            Comment


              #7
              Re: how to get rid of old kernels?

              ...and here I am.
              It suddenly says that 131 kb out of 53 used -> 100%used. wtf?

              I didn't find anything lower than 2.6.24-23, (which I use now I checked), so I deleted all bigger than -24.
              Then I gave it again the sudo dpkg --configure -a, and it gave
              Setting up initramfs-tools (0.85eubuntu39.3) ...
              update-initramfs: deferring update (trigger activated)

              Setting up linux-image-2.6.24-27-generic (2.6.24-27.67) ...
              Internal Error: Could not find image (/boot/vmlinuz-2.6.24-27-generic)
              dpkg: error processing linux-image-2.6.24-27-generic (--configure):
              subprocess post-installation script returned error exit status 2
              Setting up linux-image-2.6.24-26-generic (2.6.24-26.64) ...
              Internal Error: Could not find image (/boot/vmlinuz-2.6.24-26-generic)
              dpkg: error processing linux-image-2.6.24-26-generic (--configure):
              subprocess post-installation script returned error exit status 2
              dpkg: dependency problems prevent configuration of linux-restricted-modules-2.6.24-27-generic:
              linux-restricted-modules-2.6.24-27-generic depends on linux-image-2.6.24-27-generic; however:
              Package linux-image-2.6.24-27-generic is not configured yet.
              dpkg: error processing linux-restricted-modules-2.6.24-27-generic (--configure):
              dependency problems - leaving unconfigured
              dpkg: dependency problems prevent configuration of linux-ubuntu-modules-2.6.24-27-generic:
              linux-ubuntu-modules-2.6.24-27-generic depends on linux-image-2.6.24-27-generic; however:
              Package linux-image-2.6.24-27-generic is not configured yet.
              dpkg: error processing linux-ubuntu-modules-2.6.24-27-generic (--configure):
              dependency problems - leaving unconfigured
              dpkg: dependency problems prevent configuration of linux-restricted-modules-2.6.24-26-generic:
              linux-restricted-modules-2.6.24-26-generic depends on linux-image-2.6.24-26-generic; however:
              Package linux-image-2.6.24-26-generic is not configured yet.
              dpkg: error processing linux-restricted-modules-2.6.24-26-generic (--configure):
              dependency problems - leaving unconfigured
              dpkg: dependency problems prevent configuration of linux-ubuntu-modules-2.6.24-26-generic:
              linux-ubuntu-modules-2.6.24-26-generic depends on linux-image-2.6.24-26-generic; however:
              Package linux-image-2.6.24-26-generic is not configured yet.
              dpkg: error processing linux-ubuntu-modules-2.6.24-26-generic (--configure):
              dependency problems - leaving unconfigured
              dpkg: dependency problems prevent configuration of linux-image-generic:
              linux-image-generic depends on linux-image-2.6.24-27-generic; however:
              Package linux-image-2.6.24-27-generic is not configured yet.
              linux-image-generic depends on linux-ubuntu-modules-2.6.24-27-generic; however:
              Package linux-ubuntu-modules-2.6.24-27-generic is not configured yet.
              dpkg: error processing linux-image-generic (--configure):
              dependency problems - leaving unconfigured
              dpkg: dependency problems prevent configuration of linux-restricted-modules-generic:
              linux-restricted-modules-generic depends on linux-restricted-modules-2.6.24-27-generic; however:
              Package linux-restricted-modules-2.6.24-27-generic is not configured yet.
              dpkg: error processing linux-restricted-modules-generic (--configure):
              dependency problems - leaving unconfigured
              dpkg: dependency problems prevent configuration of linux-generic:
              linux-generic depends on linux-image-generic (= 2.6.24.27.29); however:
              Package linux-image-generic is not configured yet.
              linux-generic depends on linux-restricted-modules-generic (= 2.6.24.27.29); however:
              Package linux-restricted-modules-generic is not configured yet.
              dpkg: error processing linux-generic (--configure):
              dependency problems - leaving unconfigured
              Processing triggers for initramfs-tools ...
              update-initramfs: Generating /boot/initrd.img-2.6.24-25-generic

              gzip: stdout: No space left on device
              update-initramfs: failed for /boot/initrd.img-2.6.24-25-generic
              dpkg: subprocess post-installation script returned error exit status 1

              So what now?

              Adept still won't open.

              Comment


                #8
                Re: how to get rid of old kernels?

                boot to a gparted cd and enlarge your /boot partition

                then run

                sudo apt-get update
                sudo apt-get install --fix-broken --fix-missing

                Please Read Me

                Comment


                  #9
                  Re: how to get rid of old kernels?

                  (I'm not a technical guy, more of a Point and Click guy)

                  I deleted all bigger than -24.
                  How EXACTLY did you do this? Have you just set about deleting files? Hence e.g. Internal Error: Could not find image (/boot/vmlinuz-2.6.24-27-generic). Bad move!

                  Basically all packages are listed in ONE database. Whether you use dpkg, apt-get, Aptitude, Add/Remove, Synaptic etc., you are using the ONE AND ONLY database. If you have deleted files they still appear in that database and can't be found.

                  Qqmike's post is OK, but it is mostly about being able to access the system and needs to be teased apart. You would be OK to have deleted bits or copied off bits from your Home and created space that way.

                  For me, life's too short to mess about. I would copy off your Home entirely and do a clean install of 10.04.

                  If you want to stick with what you've got look at deleting bits for your Home then first run
                  sudo apt-get autoclean
                  sudo apt-get clean
                  sudo apt-get autoremove
                  sudo apt-get update

                  "A problem well stated is a problem half solved." --Charles F. Kettering
                  "Sometimes the questions are complicated and the answers are simple."--Dr. Seuss

                  Comment


                    #10
                    Re: how to get rid of old kernels?

                    Oshunlover: I'm confused. Never heard about what you said. How exactly do I do that?

                    Arochester: I deleted those files with dolphin once I had written "sudo dolphin" in Konsole. I just clicked and swished so to say. I thought it was bad, but didn't listen to myself
                    Changing to 10.04 kinda sounds good now. How do I do that?

                    So first I'm gonna try what oshunlover said and if that doesn't help, I'm changing to 10.04.

                    Comment


                      #11
                      Re: how to get rid of old kernels?

                      Do your self a favor. Obtain, either by downloading/burning or via ShipIt, a Kubuntu Lucid Lynx 10.04 LiveCD and try it out on your rig. You want to know if Lucid will work with your hardware before you install it.

                      I recommend that you also obtain a LiveCD of GParted to use for preparing your HD. The recommended partitioning scheme is three partitions, one for root ( / ), one for home ( /home ) and one for swap. (It isn't necessary to have a separate /boot partition.) The root partition should be (IMO) 10Gb (4Gb is sufficient), the swap partition equal to 1.5 to 2 times your RAM (if you have 1GB of RAM, the swap partition should be 1.5 to 2.0 Gb). The /home partition can be any size - normally the remaining amount of space on the HD, unless you have a really large HD, and you want to 'reserve' space for future use - you decide. My personal recommendation is to format the root and /home partitions as ext3.
                      Using Kubuntu Linux since March 23, 2007
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Re: how to get rid of old kernels?

                        Thanks snowhog. What I understood under all that computertalk was that I should put everything under the same roof and not separate the "running the computer" with the "entertainment computer". So that I could free disk space just by getting rid of movies etc. Right?

                        Ok. I just opened my computer and it went straight to the recovery mode (error 15, file not found, press any key), and I did the route 2.6.23-24-generic -> dpkg fix broken packages or something and then I started it. Somehow I think that I cannot fix this... Even the dolphin now says when I close it, that there is some "error, couldn't save bookmarks, propably because hard drive is full". yeah I know... :P



                        Comment


                          #13
                          Re: how to get rid of old kernels?

                          For future reference - getting rid of old kernels to free up some space is as good as useless, as they are surprisingly small. With any luck you have probably freed some 100MB, no more than that. A better way is to clean your package cache using apt-get.

                          For now: go with Snowhog's advice and give yourself a 15 or 20gb / partition.
                          Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                          Comment


                            #14
                            Re: how to get rid of old kernels?

                            Originally posted by toad
                            For now: go with Snowhog's advice and give yourself a 15 or 20gb / partition.
                            Could I have that step by step? I really don't know how it's done.

                            I noticed that getting rid of the kernels didn't do much, thanks for the advice. I already tried apt-get several times, but it doesn't work. Always gives me the "you must manually run dpkg --configure..." and when I do that it gives me no can do.

                            Comment


                              #15
                              Re: how to get rid of old kernels?

                              Originally posted by Muistipeliviidakko
                              Could I have that step by step? I really don't know how it's done.
                              Sure - please check the link to FAQ in my signature - it is there under #5. You will also find alot of other useful info
                              Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                              Comment

                              Working...
                              X