[CentOS] Cleaning up the boot partition

Robert Heller heller at deepsoft.com
Tue Jan 26 17:03:15 UTC 2010


At Tue, 26 Jan 2010 08:31:02 -0800 CentOS mailing list <centos at centos.org> wrote:

> 
> 
> 
> I get this error:
> 
> No Packages marked for removal

(Was anything else displayed, like maybe dependency issues?)

rm /boot/*2.6.9-42* /boot/*2.6.9-55*

will also work (but check in /boot/grub/grub.conf!).  Maybe somehow
you installed these kernels without using yum/rpm or you removed the
packages and somehow the files were left behind -- maybe you did a
backup and restore of /boot or /boot was mounted readonly at the time
you did the yum remove / rpm -e or something else (like a fresh
re-install without reformatting /boot or somehow else you ended up with
/boot out of sync with your rpm DB).

Check in /boot/grub/grub.conf -- any kernel shown below that is NOT
mentioned in /boot/grub/grub.conf can safely be removed, either with yum
(yum remove kernel-<version>), or with rpm (rpm -e kernel-<version>), or
with rm (rm /boot/*<version>*).  If you do use rm (if all else fails),
be sure to look in /lib/modules/<version> and clean this up with rm as
well.

If you *still* need more space, you can use 'yum remove
kernel-<version>' or 'rpm -e kernel-<version>' of additional kernels,
don't removing the running kernel!  You don't *need* to keep anything
but the latest kernel, although it is reasonable to keep the last 2-3
kernels as a safety measure against kernel problems (bugs in the latest
kernel or drivers, etc.).

> 
> Todd
> 
> m.roth at 5-cent.us wrote:
> >> Is there an easy way to remove unwanted files in the boot partition?  I
> >> have run out of space and need to remove unneeded files, however I do
> >> not have extensive administrative skills.
> >>
> >>     
> > yum remove kernel-2.6.9-42 kernel-2.6.9-55
> >
> >     mark
> >   
> >> Todd
> >>
> >> -rw-r--r--  1 root root   49931 Feb 27  2007 config-2.6.9-42.0.10.ELsmp
> >> -rw-r--r--  1 root root   49930 Oct  6  2006 config-2.6.9-42.0.3.ELsmp
> >> -rw-r--r--  1 root root   49930 Jan 30  2007 config-2.6.9-42.0.8.ELsmp
> >> -rw-r--r--  1 root root   49926 Aug 12  2006 config-2.6.9-42.ELsmp
> >> -rw-r--r--  1 root root   50058 Nov  2  2007 config-2.6.9-55.0.12.ELsmp
> >> -rw-r--r--  1 root root   50057 Jun 26  2007 config-2.6.9-55.0.2.ELsmp
> >> -rw-r--r--  1 root root   50057 Sep  4  2007 config-2.6.9-55.0.6.ELsmp
> >> -rw-r--r--  1 root root   50057 Sep 27  2007 config-2.6.9-55.0.9.ELsmp
> >> -rw-r--r--  1 root root   50053 May  2  2007 config-2.6.9-55.ELsmp
> >> -rw-r--r--  1 root root   50925 May  8  2008 config-2.6.9-67.0.15.EL
> >> -rw-r--r--  1 root root   50550 May  8  2008 config-2.6.9-67.0.15.ELsmp
> >> -rw-r--r--  1 root root   50549 Dec 19  2007 config-2.6.9-67.0.1.ELsmp
> >> -rw-r--r--  1 root root   50549 Feb  3  2008 config-2.6.9-67.0.4.ELsmp
> >> -rw-r--r--  1 root root   50924 Mar 15  2008 config-2.6.9-67.0.7.EL
> >> -rw-r--r--  1 root root   50549 Mar 15  2008 config-2.6.9-67.0.7.ELsmp
> >> -rw-r--r--  1 root root   50545 Nov 16  2007 config-2.6.9-67.ELsmp
> >> -rw-r--r--  1 root root   51502 Jan 14  2009 config-2.6.9-78.0.13.EL
> >> -rw-r--r--  1 root root   51127 Jan 14  2009 config-2.6.9-78.0.13.ELsmp
> >> -rw-r--r--  1 root root   51614 Sep 15 04:12 config-2.6.9-89.0.11.EL
> >> -rw-r--r--  1 root root   51239 Sep 15 04:25 config-2.6.9-89.0.11.ELsmp
> >> -rw-r--r--  1 root root   51614 Nov  3 14:28 config-2.6.9-89.0.16.EL
> >> -rw-r--r--  1 root root   51239 Nov  3 14:43 config-2.6.9-89.0.16.ELsmp
> >> -rw-r--r--  1 root root   51614 Dec 15 11:17 config-2.6.9-89.0.18.EL
> >> -rw-r--r--  1 root root   51239 Dec 15 11:43 config-2.6.9-89.0.18.ELsmp
> >> drwxr-xr-x  2 root root    1024 Dec 24 09:07 grub
> >> -rw-r--r--  1 root root 1035186 Feb 28  2007
> >> initrd-2.6.9-42.0.10.ELsmp.img
> >> -rw-r--r--  1 root root 1035083 Jan 12  2007 initrd-2.6.9-42.0.3.ELsmp.img
> >> -rw-r--r--  1 root root 1035178 Feb  3  2007 initrd-2.6.9-42.0.8.ELsmp.img
> >> -rw-r--r--  1 root root 1034697 Jan 13  2007 initrd-2.6.9-42.ELsmp.img
> >> -rw-r--r--  1 root root 1363711 Nov 29  2007
> >> initrd-2.6.9-55.0.12.ELsmp.img
> >> -rw-r--r--  1 root root 1363684 Jun 28  2007 initrd-2.6.9-55.0.2.ELsmp.img
> >> -rw-r--r--  1 root root 1363691 Sep 11  2007 initrd-2.6.9-55.0.6.ELsmp.img
> >> -rw-r--r--  1 root root 1363691 Oct  1  2007 initrd-2.6.9-55.0.9.ELsmp.img
> >> -rw-r--r--  1 root root 1036237 May 17  2007 initrd-2.6.9-55.ELsmp.img
> >> -rw-r--r--  1 root root 1310785 May 13  2008 initrd-2.6.9-67.0.15.EL.img
> >> -rw-r--r--  1 root root 1296854 Dec 27  2007 initrd-2.6.9-67.0.1.ELsmp.img
> >> -rw-r--r--  1 root root 1296894 Feb  4  2008 initrd-2.6.9-67.0.4.ELsmp.img
> >> -rw-r--r--  1 root root 1310809 Mar 17  2008 initrd-2.6.9-67.0.7.EL.img
> >> -rw-r--r--  1 root root 1296959 Mar 17  2008 initrd-2.6.9-67.0.7.ELsmp.img
> >> -rw-r--r--  1 root root 1296326 Dec 18  2007 initrd-2.6.9-67.ELsmp.img
> >> -rw-r--r--  1 root root 1333301 Mar 14  2009 initrd-2.6.9-78.0.13.EL.img
> >> -rw-r--r--  1 root root 1319564 Mar 14  2009
> >> initrd-2.6.9-78.0.13.ELsmp.img
> >> -rw-r--r--  1 root root 1342750 Sep 22 12:31 initrd-2.6.9-89.0.11.EL.img
> >> -rw-r--r--  1 root root 1327296 Sep 22 12:30
> >> initrd-2.6.9-89.0.11.ELsmp.img
> >> -rw-r--r--  1 root root 1342746 Nov 26 08:43 initrd-2.6.9-89.0.16.EL.img
> >> -rw-r--r--  1 root root 1327291 Nov 26 08:58
> >> initrd-2.6.9-89.0.16.ELsmp.img
> >> -rw-r--r--  1 root root 1342761 Dec 24 09:07 initrd-2.6.9-89.0.18.EL.img
> >> -rw-r--r--  1 root root 1327310 Dec 24 08:49
> >> initrd-2.6.9-89.0.18.ELsmp.img
> >> drwx------  2 root root   12288 Jan 12  2007 lost+found
> >> -rw-r--r--  1 root root    9371 Aug 12  2006 message
> >> -rw-r--r--  1 root root    9371 Aug 12  2006 message.ja
> >> -rw-r--r--  1 root root   64329 May  8  2008 symvers-2.6.9-67.0.15.EL.gz
> >> -rw-r--r--  1 root root   65151 May  8  2008
> >> symvers-2.6.9-67.0.15.ELsmp.gz
> >> -rw-r--r--  1 root root   65129 Dec 19  2007 symvers-2.6.9-67.0.1.ELsmp.gz
> >> -rw-r--r--  1 root root   65129 Feb  3  2008 symvers-2.6.9-67.0.4.ELsmp.gz
> >> -rw-r--r--  1 root root   64308 Mar 15  2008 symvers-2.6.9-67.0.7.EL.gz
> >> -rw-r--r--  1 root root   65129 Mar 15  2008 symvers-2.6.9-67.0.7.ELsmp.gz
> >> -rw-r--r--  1 root root   65129 Nov 16  2007 symvers-2.6.9-67.ELsmp.gz
> >> -rw-r--r--  1 root root   66235 Jan 14  2009 symvers-2.6.9-78.0.13.EL.gz
> >> -rw-r--r--  1 root root   67032 Jan 14  2009
> >> symvers-2.6.9-78.0.13.ELsmp.gz
> >> -rw-r--r--  1 root root   67596 Sep 15 04:12 symvers-2.6.9-89.0.11.EL.gz
> >> -rw-r--r--  1 root root   68382 Sep 15 04:25
> >> symvers-2.6.9-89.0.11.ELsmp.gz
> >> -rw-r--r--  1 root root   67596 Nov  3 14:29 symvers-2.6.9-89.0.16.EL.gz
> >> -rw-r--r--  1 root root   68382 Nov  3 14:43
> >> symvers-2.6.9-89.0.16.ELsmp.gz
> >> -rw-r--r--  1 root root   67596 Dec 15 11:18 symvers-2.6.9-89.0.18.EL.gz
> >> -rw-r--r--  1 root root   68382 Dec 15 11:45
> >> symvers-2.6.9-89.0.18.ELsmp.gz
> >> -rw-r--r--  1 root root  767450 Feb 27  2007
> >> System.map-2.6.9-42.0.10.ELsmp
> >> -rw-r--r--  1 root root  766287 Oct  6  2006 System.map-2.6.9-42.0.3.ELsmp
> >> -rw-r--r--  1 root root  767450 Jan 30  2007 System.map-2.6.9-42.0.8.ELsmp
> >> -rw-r--r--  1 root root  766260 Aug 12  2006 System.map-2.6.9-42.ELsmp
> >> -rw-r--r--  1 root root  771586 Nov  2  2007
> >> System.map-2.6.9-55.0.12.ELsmp
> >> -rw-r--r--  1 root root  771374 Jun 26  2007 System.map-2.6.9-55.0.2.ELsmp
> >> -rw-r--r--  1 root root  771586 Sep  4  2007 System.map-2.6.9-55.0.6.ELsmp
> >> -rw-r--r--  1 root root  771586 Sep 27  2007 System.map-2.6.9-55.0.9.ELsmp
> >> -rw-r--r--  1 root root  771273 May  2  2007 System.map-2.6.9-55.ELsmp
> >> -rw-r--r--  1 root root  760532 May  8  2008 System.map-2.6.9-67.0.15.EL
> >> -rw-r--r--  1 root root  777506 May  8  2008
> >> System.map-2.6.9-67.0.15.ELsmp
> >> -rw-r--r--  1 root root  776963 Dec 19  2007 System.map-2.6.9-67.0.1.ELsmp
> >> -rw-r--r--  1 root root  776963 Feb  3  2008 System.map-2.6.9-67.0.4.ELsmp
> >> -rw-r--r--  1 root root  760171 Mar 15  2008 System.map-2.6.9-67.0.7.EL
> >> -rw-r--r--  1 root root  777145 Mar 15  2008 System.map-2.6.9-67.0.7.ELsmp
> >> -rw-r--r--  1 root root  776963 Nov 16  2007 System.map-2.6.9-67.ELsmp
> >> -rw-r--r--  1 root root  780162 Jan 14  2009 System.map-2.6.9-78.0.13.EL
> >> -rw-r--r--  1 root root  797154 Jan 14  2009
> >> System.map-2.6.9-78.0.13.ELsmp
> >> -rw-r--r--  1 root root  768606 Sep 15 04:12 System.map-2.6.9-89.0.11.EL
> >> -rw-r--r--  1 root root  785600 Sep 15 04:25
> >> System.map-2.6.9-89.0.11.ELsmp
> >> -rw-r--r--  1 root root  768660 Nov  3 14:28 System.map-2.6.9-89.0.16.EL
> >> -rw-r--r--  1 root root  785654 Nov  3 14:43
> >> System.map-2.6.9-89.0.16.ELsmp
> >> -rw-r--r--  1 root root  768688 Dec 15 11:17 System.map-2.6.9-89.0.18.EL
> >> -rw-r--r--  1 root root  785682 Dec 15 11:43
> >> System.map-2.6.9-89.0.18.ELsmp
> >> -rw-r--r--  1 root root 1444718 Feb 27  2007 vmlinuz-2.6.9-42.0.10.ELsmp
> >> -rw-r--r--  1 root root 1444549 Oct  6  2006 vmlinuz-2.6.9-42.0.3.ELsmp
> >> -rw-r--r--  1 root root 1444726 Jan 30  2007 vmlinuz-2.6.9-42.0.8.ELsmp
> >> -rw-r--r--  1 root root 1444405 Aug 12  2006 vmlinuz-2.6.9-42.ELsmp
> >> -rw-r--r--  1 root root 1451171 Nov  2  2007 vmlinuz-2.6.9-55.0.12.ELsmp
> >> -rw-r--r--  1 root root 1450563 Jun 26  2007 vmlinuz-2.6.9-55.0.2.ELsmp
> >> -rw-r--r--  1 root root 1450984 Sep  4  2007 vmlinuz-2.6.9-55.0.6.ELsmp
> >> -rw-r--r--  1 root root 1451003 Sep 27  2007 vmlinuz-2.6.9-55.0.9.ELsmp
> >> -rw-r--r--  1 root root 1450489 May  2  2007 vmlinuz-2.6.9-55.ELsmp
> >> -rw-r--r--  1 root root 1519376 May  8  2008 vmlinuz-2.6.9-67.0.15.EL
> >> -rw-r--r--  1 root root 1458873 Dec 19  2007 vmlinuz-2.6.9-67.0.1.ELsmp
> >> -rw-r--r--  1 root root 1545561 Jan 14  2009 vmlinuz-2.6.9-78.0.13.EL
> >> -rw-r--r--  1 root root 1483646 Jan 14  2009 vmlinuz-2.6.9-78.0.13.ELsmp
> >> -rw-r--r--  1 root root 1533468 Sep 15 04:12 vmlinuz-2.6.9-89.0.11.EL
> >> -rw-r--r--  1 root root 1472648 Sep 15 04:25 vmlinuz-2.6.9-89.0.11.ELsmp
> >> -rw-r--r--  1 root root 1536244 Nov  3 14:28 vmlinuz-2.6.9-89.0.16.EL
> >> -rw-r--r--  1 root root 1472608 Nov  3 14:43 vmlinuz-2.6.9-89.0.16.ELsmp
> >> -rw-r--r--  1 root root 1536254 Dec 15 11:17 vmlinuz-2.6.9-89.0.18.EL
> >> -rw-r--r--  1 root root 1472585 Dec 15 11:43 vmlinuz-2.6.9-89.0.18.ELsmp
> >>
> >> --
> >> Ariste Software
> >> Petaluma, CA 94952
> >>
> >> http://www.toddcary.com/aristephotography/
> >>
> >> _______________________________________________
> >> CentOS mailing list
> >> CentOS at centos.org
> >> http://lists.centos.org/mailman/listinfo/centos
> >>
> >>     
> >
> >
> > _______________________________________________
> > CentOS mailing list
> > CentOS at centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >
> >
> >   
> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                      



More information about the CentOS mailing list