Difference between revisions of "gentoo disk space cleanup"

From thelinuxwiki
Jump to: navigation, search
(removing old kernel sources)
 

Latest revision as of 23:12, 10 February 2014

Some common space hogs

removing distfiles

rm /usr/portage/distfiles/*

removing old kernel sources

Just a couple old kernel sources can consume multiple Gigabytes as seen below

# du -sh /usr/src/*                                                                                   /usr/src
0       /usr/src/linux
946M    /usr/src/linux-3.4.9-gentoo
1001M   /usr/src/linux-3.5.4-gentoo
1021M   /usr/src/linux-3.7.4-gentoo
# du -sh 
2.9G    /usr/src/

DON'T blow them away with rm, use emerge

# emerge --ask --depclean gentoo-sources

Protecting sources

Use --noreplace to protect and sources which you don't want removed

example:

root # emerge --ask --noreplace gentoo-sources:3.3.8