View previous topic :: View next topic |
Author |
Message |
luugin n00b

Joined: 10 May 2003 Posts: 69
|
Posted: Tue Jul 13, 2004 5:48 am Post subject: Removing kernel sources |
|
|
After a few months of doing "emerge -u world" i've now got several kernel sources (gentoo-sources) taking up unnecessary space. My question is, is it safe to just manually delete the directories of the kernels i am not using?
Code: | $ du -sh /usr/src/*
0 /usr/src/linux
231M /usr/src/linux-2.4.22-gentoo-r5
230M /usr/src/linux-2.4.22-gentoo-r7
195M /usr/src/linux-2.4.25-gentoo
195M /usr/src/linux-2.4.25-gentoo-r1
195M /usr/src/linux-2.4.25-gentoo-r2
196M /usr/src/linux-2.4.25-gentoo-r3
196M /usr/src/linux-2.4.26-gentoo-r3
196M /usr/src/linux-2.4.26-gentoo-r5 |
|
|
Back to top |
|
 |
koara Tux's lil' helper


Joined: 30 Jun 2004 Posts: 76 Location: Portland, Maine
|
Posted: Tue Jul 13, 2004 5:58 am Post subject: Re: Removing kernel sources |
|
|
Just run 'qpkg -I -v sys-kernel' to see what kernel sources you have installed. Then choose the package names from that list which you wish to remove by using 'emerge -C nameofkernel'.
luugin wrote: | After a few months of doing "emerge -u world" i've now got several kernel sources (gentoo-sources) taking up unnecessary space. My question is, is it safe to just manually delete the directories of the kernels i am not using?
Code: | $ du -sh /usr/src/*
0 /usr/src/linux
231M /usr/src/linux-2.4.22-gentoo-r5
230M /usr/src/linux-2.4.22-gentoo-r7
195M /usr/src/linux-2.4.25-gentoo
195M /usr/src/linux-2.4.25-gentoo-r1
195M /usr/src/linux-2.4.25-gentoo-r2
196M /usr/src/linux-2.4.25-gentoo-r3
196M /usr/src/linux-2.4.26-gentoo-r3
196M /usr/src/linux-2.4.26-gentoo-r5 |
|
|
|
Back to top |
|
 |
Jake Veteran

Joined: 31 Jul 2003 Posts: 1132
|
Posted: Tue Jul 13, 2004 6:05 am Post subject: |
|
|
If emerge -C doesn't delete the source, it's safe to rm -rf it. You'll probably also want to remove the old modules from /lib/modules. |
|
Back to top |
|
 |
manywele l33t


Joined: 12 Jul 2003 Posts: 743 Location: Inside
|
Posted: Tue Jul 13, 2004 6:52 am Post subject: |
|
|
And don't forget to remove old source tarballs from /usr/portage/distfiles. Those can build up and take up a lot of space. |
|
Back to top |
|
 |
guitou Guru

Joined: 02 Oct 2003 Posts: 534 Location: France
|
Posted: Tue Jul 13, 2004 2:45 pm Post subject: |
|
|
Code: |
emerge -Cp gentoo-sources
emerge -C =gentoo-sources-2.4.22-r5 gentoo-sources-2.4.22...
|
This is ther proper way to unmerge old kernel sources.
And you can do it even after having removed sources and modules (unmerge will just complain about missing files).
++ |
|
Back to top |
|
 |
luugin n00b

Joined: 10 May 2003 Posts: 69
|
Posted: Tue Jul 13, 2004 2:49 pm Post subject: |
|
|
Ok thanx. It's nice to know the 'proper' way of doing things  |
|
Back to top |
|
 |
guitou Guru

Joined: 02 Oct 2003 Posts: 534 Location: France
|
Posted: Tue Jul 13, 2004 3:37 pm Post subject: |
|
|
Hmmm... well, probably the most proper way
++ |
|
Back to top |
|
 |
|