Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default clean /boot partition

    /boot partition is nearly 100% full.

    I want to clean it. Is there a quick way to delete files older than X date?

    What sample command would I run for example to delete all files older than the latest vmlinuz-2.6.9-89.0.19.ELsmp

    Code:
    lrwxrwxrwx   1 root root   16 Apr  4  2006 vmlinuz -> vmlinuz-2.6.16.1
    -rw-r--r--   1 root root 1.5M Apr  4  2006 vmlinuz-2.6.16.1
    -rw-r--r--   1 root root 1.4M Jun  8  2005 vmlinuz-2.6.9-11.EL
    -rw-r--r--   1 root root 1.5M Jul  7  2006 vmlinuz-2.6.9-34.0.2.EL
    -rw-r--r--   1 root root 1.5M Mar  8  2006 vmlinuz-2.6.9-34.EL
    -rw-r--r--   1 root root 1.4M Feb 27  2007 vmlinuz-2.6.9-42.0.10.ELsmp
    -rw-r--r--   1 root root 1.4M Aug 23  2006 vmlinuz-2.6.9-42.0.2.ELsmp
    -rw-r--r--   1 root root 1.4M Oct  6  2006 vmlinuz-2.6.9-42.0.3.ELsmp
    -rw-r--r--   1 root root 1.4M Jan 30  2007 vmlinuz-2.6.9-42.0.8.ELsmp
    -rw-r--r--   1 root root 1.4M Jul 12  2006 vmlinuz-2.6.9-42.ELsmp
    -rw-r--r--   1 root root 1.4M Feb 19  2005 vmlinuz-2.6.9-5.0.3.EL
    -rw-r--r--   1 root root 1.4M Jun 26  2007 vmlinuz-2.6.9-55.0.2.ELsmp
    -rw-r--r--   1 root root 1.4M Sep 27  2007 vmlinuz-2.6.9-55.0.9.ELsmp
    -rw-r--r--   1 root root 1.4M May  2  2007 vmlinuz-2.6.9-55.ELsmp
    -rw-r--r--   1 root root 1.4M May  8  2008 vmlinuz-2.6.9-67.0.15.ELsmp
    -rw-r--r--   1 root root 1.4M Dec 19  2007 vmlinuz-2.6.9-67.0.1.ELsmp
    -rw-r--r--   1 root root 1.4M Jun 26  2008 vmlinuz-2.6.9-67.0.20.ELsmp
    -rw-r--r--   1 root root 1.4M Jul 23  2008 vmlinuz-2.6.9-67.0.22.ELsmp
    -rw-r--r--   1 root root 1.4M Feb  3  2008 vmlinuz-2.6.9-67.0.4.ELsmp
    -rw-r--r--   1 root root 1.4M Mar 15  2008 vmlinuz-2.6.9-67.0.7.ELsmp
    -rw-r--r--   1 root root 1.5M Jan 14  2009 vmlinuz-2.6.9-78.0.13.ELsmp
    -rw-r--r--   1 root root 1.5M Aug  5  2008 vmlinuz-2.6.9-78.0.1.EL
    -rw-r--r--   1 root root 1.5M Aug  5  2008 vmlinuz-2.6.9-78.0.1.ELsmp
    -rw-r--r--   1 root root 1.5M Apr 30  2009 vmlinuz-2.6.9-78.0.22.ELsmp
    -rw-r--r--   1 root root 1.5M Oct  8  2008 vmlinuz-2.6.9-78.0.5.EL
    -rw-r--r--   1 root root 1.5M Nov 19  2008 vmlinuz-2.6.9-78.0.8.ELsmp
    -rw-r--r--   1 root root 1.5M Sep 15 06:25 vmlinuz-2.6.9-89.0.11.ELsmp
    -rw-r--r--   1 root root 1.5M Nov  3 16:43 vmlinuz-2.6.9-89.0.16.ELsmp
    -rw-r--r--   1 root root 1.5M Jan  8 05:52 vmlinuz-2.6.9-89.0.19.ELsmp
    -rw-r--r--   1 root root 1.5M Aug 24 07:03 vmlinuz-2.6.9-89.0.9.ELsmp

  2. #2
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default

    Anyone please?

  3. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by Zion Ahead View Post
    /boot partition is nearly 100% full.

    I want to clean it. Is there a quick way to delete files older than X date?

    What sample command would I run for example to delete all files older than the latest vmlinuz-2.6.9-89.0.19.ELsmp

    Code:
    lrwxrwxrwx   1 root root   16 Apr  4  2006 vmlinuz -> vmlinuz-2.6.16.1
    -rw-r--r--   1 root root 1.5M Apr  4  2006 vmlinuz-2.6.16.1
    -rw-r--r--   1 root root 1.4M Jun  8  2005 vmlinuz-2.6.9-11.EL
    -rw-r--r--   1 root root 1.5M Jul  7  2006 vmlinuz-2.6.9-34.0.2.EL
    -rw-r--r--   1 root root 1.5M Mar  8  2006 vmlinuz-2.6.9-34.EL
    -rw-r--r--   1 root root 1.4M Feb 27  2007 vmlinuz-2.6.9-42.0.10.ELsmp
    -rw-r--r--   1 root root 1.4M Aug 23  2006 vmlinuz-2.6.9-42.0.2.ELsmp
    -rw-r--r--   1 root root 1.4M Oct  6  2006 vmlinuz-2.6.9-42.0.3.ELsmp
    -rw-r--r--   1 root root 1.4M Jan 30  2007 vmlinuz-2.6.9-42.0.8.ELsmp
    -rw-r--r--   1 root root 1.4M Jul 12  2006 vmlinuz-2.6.9-42.ELsmp
    -rw-r--r--   1 root root 1.4M Feb 19  2005 vmlinuz-2.6.9-5.0.3.EL
    -rw-r--r--   1 root root 1.4M Jun 26  2007 vmlinuz-2.6.9-55.0.2.ELsmp
    -rw-r--r--   1 root root 1.4M Sep 27  2007 vmlinuz-2.6.9-55.0.9.ELsmp
    -rw-r--r--   1 root root 1.4M May  2  2007 vmlinuz-2.6.9-55.ELsmp
    -rw-r--r--   1 root root 1.4M May  8  2008 vmlinuz-2.6.9-67.0.15.ELsmp
    -rw-r--r--   1 root root 1.4M Dec 19  2007 vmlinuz-2.6.9-67.0.1.ELsmp
    -rw-r--r--   1 root root 1.4M Jun 26  2008 vmlinuz-2.6.9-67.0.20.ELsmp
    -rw-r--r--   1 root root 1.4M Jul 23  2008 vmlinuz-2.6.9-67.0.22.ELsmp
    -rw-r--r--   1 root root 1.4M Feb  3  2008 vmlinuz-2.6.9-67.0.4.ELsmp
    -rw-r--r--   1 root root 1.4M Mar 15  2008 vmlinuz-2.6.9-67.0.7.ELsmp
    -rw-r--r--   1 root root 1.5M Jan 14  2009 vmlinuz-2.6.9-78.0.13.ELsmp
    -rw-r--r--   1 root root 1.5M Aug  5  2008 vmlinuz-2.6.9-78.0.1.EL
    -rw-r--r--   1 root root 1.5M Aug  5  2008 vmlinuz-2.6.9-78.0.1.ELsmp
    -rw-r--r--   1 root root 1.5M Apr 30  2009 vmlinuz-2.6.9-78.0.22.ELsmp
    -rw-r--r--   1 root root 1.5M Oct  8  2008 vmlinuz-2.6.9-78.0.5.EL
    -rw-r--r--   1 root root 1.5M Nov 19  2008 vmlinuz-2.6.9-78.0.8.ELsmp
    -rw-r--r--   1 root root 1.5M Sep 15 06:25 vmlinuz-2.6.9-89.0.11.ELsmp
    -rw-r--r--   1 root root 1.5M Nov  3 16:43 vmlinuz-2.6.9-89.0.16.ELsmp
    -rw-r--r--   1 root root 1.5M Jan  8 05:52 vmlinuz-2.6.9-89.0.19.ELsmp
    -rw-r--r--   1 root root 1.5M Aug 24 07:03 vmlinuz-2.6.9-89.0.9.ELsmp
    Quote Originally Posted by Zion Ahead View Post
    Anyone please?
    Warning: While practicing extreme caution, older kernel RPMs may be removed using the OS package manager. If your OS is CentOS, YUM may be that tool.

    For information on using YUM, please refer to its official manual page as accessed via the following command:
    Code:
    # man yum
    First, check what kernel you're using, and do not attempt to remove it:
    Code:
    # uname -a
    Also check what kernel RPMs are installed, and be sure to keep both the currently used kernel as well as some others to choose from as seen when checking the kernel RPM versions installed. If one version does not work (e.g., failure to boot properly) it helps to have a backup to try (with on-site assistance from data center staff).

    To simply obtain a list of the installed kernel packages (RPMs), try the following:
    Code:
    # rpm -q kernel kernel-smp
    An alternative to the above command, but one that will take longer to complete, is the following:
    Code:
    # rpm -qa | grep -i kernel | sort
    At one's own risk, an older kernel RPM may be removed using "yum remove" followed by the package name and version, exactly as displayed by the output from "rpm" as seen by the last command.

    Warning: If there is any uncertainty involved or if this is unfamiliar please escalate the request to the on-site data center staff as only they could help if something were to go wrong.

  4. #4
    Member
    Join Date
    Sep 2006
    Posts
    144
    cPanel/Enkompass Access Level

    Website Owner

    Default

    just remove old kernels.

    1) rpm -qa | grep kernel

    2) rpm -e kernel.....

Similar Threads & Tags
Similar threads

  1. clean /boot partition
    By Zion Ahead in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-08-2010, 07:12 PM
  2. Cant boot cpanel?
    By kaldesign in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-21-2008, 02:19 AM
  3. boot partition getting full?
    By noimad1 in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 06-17-2005, 05:26 AM
  4. Missing / Hidden files in boot partition
    By Website Rob in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-25-2003, 11:53 AM
  5. boot
    By E3000 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-01-2002, 04:20 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube