View previous topic :: View next topic |
Author |
Message |
luugin n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
koara Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/202725955140e2f5a699aa9.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
Jake Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
manywele l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/13427747853f93440ae0cab.jpg)
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 |
|
![](templates/gentoo/images/spacer.gif) |
guitou Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
luugin n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guitou Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
|