Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Removing kernel sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
luugin
n00b
n00b


Joined: 10 May 2003
Posts: 69

PostPosted: Tue Jul 13, 2004 5:48 am    Post subject: Removing kernel sources Reply with quote

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
View user's profile Send private message
koara
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2004
Posts: 76
Location: Portland, Maine

PostPosted: Tue Jul 13, 2004 5:58 am    Post subject: Re: Removing kernel sources Reply with quote

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
View user's profile Send private message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Tue Jul 13, 2004 6:05 am    Post subject: Reply with quote

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
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 743
Location: Inside

PostPosted: Tue Jul 13, 2004 6:52 am    Post subject: Reply with quote

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
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Tue Jul 13, 2004 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
luugin
n00b
n00b


Joined: 10 May 2003
Posts: 69

PostPosted: Tue Jul 13, 2004 2:49 pm    Post subject: Reply with quote

Ok thanx. It's nice to know the 'proper' way of doing things :)
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Tue Jul 13, 2004 3:37 pm    Post subject: Reply with quote

Hmmm... well, probably the most proper way :roll:

++
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum