public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony E. Caudel" <acaudel@gt.rr.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Any consequences to package.mask'ing newer kernels?
Date: Fri, 13 Apr 2007 17:49:04 -0500	[thread overview]
Message-ID: <462008E0.50209@gt.rr.com> (raw)
In-Reply-To: <20070413005947.27416382@hactar.digimed.co.uk>

Neil Bothwick wrote:
> On Fri, 13 Apr 2007 01:33:43 +0200, Bo Ørsted Andresen wrote:
> 
>>>> At around 300MB per kernel, that's ten excess kernels, so you can't
>>>> be doing it that often. Once you're happy with the current kernel,
>>>> you only need "emerge -P gentoo-sources" to remove the rest. I use
>>>> a script that removes all but the last two, and also cleans
>>>> out /lib/modules and /boot.  
>>> Neil, any chance we could get that script?  
>> Provided you have gentoolkit something as simple as this works:
>>
>> # emerge -Cva $(equery -q list gentoo-sources | head -n -2)
> 
> That only cleans out /usr/src, it's slightly different to what I use
> (which rm's the directories first to speed things up) but does basically
> the same. You also need to clear out /lib/modules and /boot with
> 
> Here's the script I use, which is guaranteed to work when it doesn't
> fail. When it does break, you can keep the pieces.
> 
> #!/bin/bash
> 
> # clean /lib/modules
> cd /lib/modules
> ls -1rt | head -n -2 | xargs --no-run-if-empty rm -fr
> 
> # clean /boot
> grep --quiet /boot /etc/fstab && mount /boot -o remount,rw
> 
> cd /boot
> ls -1rt config-* | head -n -2 | while read f; do
> 	bzip2 -9 $f
> 	mv $f.bz2 oldconfigs/
> 	done
> 
> ls -1rt System.map-* | head -n -2 | xargs --no-run-if-empty rm -f
> if [ -f vmlinux ]; then
> 	ls -1rt vmlinux-* | head -n -2 | xargs --no-run-if-empty rm -f
> else
> 	ls -1rt vmlinuz-* | head -n -2 | xargs --no-run-if-empty rm -f 
> 	fi
> 
> # clean /usr/src
> cd /usr/src
> ls -1drt linux-* | head -n -2 | xargs --no-run-if-empty rm -fr
> equery --quiet --nocolor list --duplicates gentoo-sources | awk '{print $1}' | head -n -2 | xargs --no-run-if-empty emerge --unmerge &>/dev/null
> 
> grep --quiet /boot /etc/fstab && mount /boot -o remount,ro
> # END
> 
> The vmlinuz/vmlinux stuff is because I have a PPC system too, which calls the kernel vmlinux.
> 
> 

Thanks Neil.

Tony

-- 
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
-- 
gentoo-user@gentoo.org mailing list



      parent reply	other threads:[~2007-04-13 22:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-31  5:55 [gentoo-user] Any consequences to package.mask'ing newer kernels? Walter Dnes
2007-03-31  8:21 ` Neil Bothwick
2007-04-02  5:02   ` Walter Dnes
2007-04-02  8:37     ` Neil Bothwick
2007-03-31 10:05 ` Boyd Stephen Smith Jr.
2007-03-31 11:06   ` Hemmann, Volker Armin
2007-03-31 11:03 ` Hemmann, Volker Armin
2007-03-31 16:05   ` b.n.
2007-03-31 14:11     ` Hemmann, Volker Armin
2007-04-01 14:21       ` b.n.
2007-04-01 12:48         ` Hemmann, Volker Armin
2007-04-01 22:51           ` b.n.
2007-04-01 21:35             ` Hemmann, Volker Armin
2007-04-01 22:21               ` Neil Bothwick
2007-04-02  5:35       ` Walter Dnes
2007-04-02  8:38         ` Neil Bothwick
     [not found] ` <200704130133.49396.bo.andresen@zlin.dk>
     [not found]   ` <20070413005947.27416382@hactar.digimed.co.uk>
2007-04-13  0:11     ` Bo Ørsted Andresen
2007-04-13  7:40       ` Neil Bothwick
2007-04-16 13:00         ` Neil Bothwick
2007-04-16 13:06           ` Bo Ørsted Andresen
2007-04-16 13:48             ` Neil Bothwick
2007-04-13 22:49     ` Anthony E. Caudel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=462008E0.50209@gt.rr.com \
    --to=acaudel@gt.rr.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox