# 2gb hd space gone after emerge world

## swp6499

im not sure because im new to gentoo but i did a emere world and now 2gb of hd space are missing somewhere..this seems excessive to me...like i said im new to gentoo and hoping someone would tell me if this is normal or excessive to them...i had 21.7gb free before emerge world and 19.7 afterward...all help is greatly appreciated...

----------

## richfish

Try: du -s /usr/portage/distfiles

"eclean distfiles" should help reclaim things by removing distfiles for packages that are no longer in portage.  "eclean --destructive distfiles" will remove distfiles for things you don't have installed, like old versions of packages.

----------

## swp6499

ran eclean distfiles and only got 257kb back...thanks for that though i did not know about eclean distfiles...anymore ideas where my space went?

----------

## richfish

Well /var/tmp/portage would be my other guess...maybe some failed or old sources lying about.

----------

## swp6499

/var/tmp/portage has 47mb in it...is it ok to delete the things in it or is it gonna harm my system?

----------

## richfish

It should be safe to remove everything that is /var/tmp/portage/.

No idea what else to check....guess you could start a hunt with "du".

----------

## swp6499

emptying out portage temp will only get me 47mb after hunting with du ive come up with absolutely nothing...im still missing 2gb of hd space and ive never had this problem with any other distro after updating...even after dist upgrading the most ive lost is maybe 300mb ...can someone please help me get my 2gb back...all help is greatly appreciated...

----------

## loki_val

Are you running ccache? If so, its files are located in /var/tmp/ccache. Do this:

```
CCACHE_DIR="/var/tmp/ccache" ccache -C
```

 to clear the directory completely.

----------

## i92guboj

Check /usr/src, each installed kernel can take around 300mb, moreless, depending on the filesystem type and the formatting and mount options.

EDIT, it would also help what kind of "emerge world" did you do. Do you know if a lot of new packages have been pushed into or was it mostly updates?

----------

## swp6499

there is no folder for var/tmp/ccache and the type of emerge world i did was emerge -uDvN world ....also there are two kernels in /usr/src a 2.6.17.6 and a 2.6.17.13 for some reason i seem to be using the lower of the kernels the 2.6.17.6 here is the output from uname -a

localhost ~ # uname -a

Linux localhost 2.6.17.6 #1 SMP Mon Dec 4 11:31:40 EST 2006 i686 Intel(R) Pentium(R) M processor 1400MHz GenuineIntel GNU/Linux

is there anything else that might help u help me?? and thanks for all the help so far

----------

## Headrush

You said you did eclean distfiles, but you still have the other files in /usr/portage/distfiles?

(eclean distfiles only removes packages no longer in portage and eclean --destructive distfiles removes packages no longer installed.)

What is the output of

```
du -hs /usr/portage/distfiles
```

----------

## swp6499

localhost ~ # du -hs /usr/portage/distfiles/

793M    /usr/portage/distfiles/

----------

## broken_chaos

Can you post the output of emerge --info too, please?

----------

## swp6499

heres the output from eclean -dp distfiles 

localhost ~ # eclean -dp distfiles

 * Building file list for distfiles cleaning...

 * Here are distfiles that would be deleted:

 [  33.9 M ] firefox-1.5.0.8-source.tar.bz2

 [  52.8 K ] glproto-1.4.7.tar.bz2

 [ 187.1 K ] libdvbpsi-0.1.3.tar.bz2

 [  36.2 K ] mozilla-firefox-1.5.0.8-patches-0.1.tar.bz2

 [  37.3 K ] util-macros-1.0.2.tar.bz2

 * Total space that would be freed in distfiles directory: 34.2 M

and the output from emerge --info

localhost ~ # emerge --info

Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.17.6 i686)

=================================================================

System uname: 2.6.17.6 i686 Intel(R) Pentium(R) M processor 1400MHz

Gentoo Base System version 1.12.6

Last Sync: Tue, 12 Dec 2006 23:00:02 +0000

app-admin/eselect-compiler: [Not Present]

dev-java/java-config: 1.3.7, 2.0.30

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     [Not Present]

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.60

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.13-r4

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium-m -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-O2 -march=pentium-m -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="x86 X alsa arts berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dlloader dri dvd dvdr eds elibc_glibc emboss encode esd fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg kde kernel_linux ldap libg++ mad mikmod mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_radeon vorbis win32codecs xml xorg xv zlib"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

if u need anything else let me know...all help is really appreciated..

----------

## Headrush

 *swp6499 wrote:*   

> localhost ~ # du -hs /usr/portage/distfiles/
> 
> 793M    /usr/portage/distfiles/

 

So there is 800MB. Unless you are going to need to re-emerge some packages, you could delete these. 

(If needed later they will be redownloaded)

I bet the rest is in /tmp and /var/tmp

Narrow down the location with:

```
du -hs /*
```

----------

## swp6499

eclean -d distfiles will only clean 40mb heres the output

ocalhost ~ # eclean -dp distfiles

* Building file list for distfiles cleaning...

* Here are distfiles that would be deleted:

[ 33.9 M ] firefox-1.5.0.8-source.tar.bz2

[ 52.8 K ] glproto-1.4.7.tar.bz2

[ 187.1 K ] libdvbpsi-0.1.3.tar.bz2

[ 36.2 K ] mozilla-firefox-1.5.0.8-patches-0.1.tar.bz2

[ 37.3 K ] util-macros-1.0.2.tar.bz2

* Total space that would be freed in distfiles directory: 34.2 M

and there is only like 76mb in the other 2 folders u named...im at a loss as to where my space went...and this makes me wary of emerging big packages like gnome 2.16 because im afraid it will take up even more space...

----------

## Headrush

swp6499, eclean is only removing the packages not in the portage anymore or ebuilds you once installed but are since removed. You still have all the sources for ebuilds you currently have emerged.

Use the du command I showed to see the location where the space is being used. Unless you show us that we are just guessing.

----------

## swp6499

here is the result of du -hs /*

localhost ~ # du -hs /*

8.2M    /bin

5.2M    /boot

192K    /dev

58M     /etc

60M     /home

34M     /lib

16K     /lost+found

4.0K    /media

132K    /metadata.tar.bz2

12K     /mnt

219M    /opt

28M     /portage-2006.1.tar.bz2

du: cannot access `/proc/21425/task/21425/fd/3': No such file or directory

du: cannot access `/proc/21425/fd/4': No such file or directory

770M    /proc

468K    /root

4.9M    /sbin

0       /sys

12M     /tmp

4.0G    /usr

250M    /var

all help is really appreciated..

----------

## Headrush

So the most is in /usr, so just keep expanding your search.

```
du -hs /usr/*
```

Edit: PS. You can remove /portage-2006.1.tar.bz2 also.

----------

## swp6499

heres the output from du -hs /usr/*

localhost ~ # du -hs /usr/*

0       /usr/X11R6

117M    /usr/bin

64K     /usr/doc

2.7M    /usr/i686-pc-linux-gnu

74M     /usr/include

69M     /usr/kde

816M    /usr/lib

19M     /usr/libexec

36K     /usr/local

1.4G    /usr/portage

27M     /usr/qt

4.1M    /usr/sbin

843M    /usr/share

721M    /usr/src

0       /usr/tmp

but i am unsure of what i can and cannot delete from the /usr directory...thanks for all your help so far

----------

## Christof_Deluca

How many things did you emerge? Did you emerge X or Gnome or KDE? If you added alot of packages, your /usr/portage directory would grow pretty big.

----------

## Headrush

Looks like you might have multiple kernel sources in /usr/src/linux.

You could unmerge the one you aren't using.

```
ls -l /usr/src/

uname -a

emerge --unmerge gentoo-sources -pv
```

----------

## swp6499

heres the output from the kernels i have

localhost ~ # ls -l /usr/src/

total 8

lrwxrwxrwx  1 root root   14 Dec  4 11:24 linux -> linux-2.6.17.6

drwxr-xr-x 19 root root 4096 Dec  9 14:47 linux-2.6.17.13

drwxr-xr-x 20 root root 4096 Dec  4 11:47 linux-2.6.17.6

localhost ~ #

localhost ~ # uname -a

Linux localhost 2.6.17.6 #1 SMP Mon Dec 4 11:31:40 EST 2006 i686 Intel(R) Pentium(R) M processor 1400MHz GenuineIntel GNU/Linux

which one should i unemerge??

and i do have X and gnome emerged...but should it really take up that much space?? i personally wouldnt consider the packages i have installed a lot...but i am new to gentoo....all help is greatly appreciated..

----------

## Christof_Deluca

The one that isn't symbolically linked to linux/; In your case, .13.

But that's the newer one. So you should choose if you want to keep the newer one and compile a new kernel from it or unmerge it.

----------

## i92guboj

 *Christof_Deluca wrote:*   

> The one that isn't symbolically linked to linux/; In your case, .13.
> 
> But that's the newer one. So you should choose if you want to keep the newer one and compile a new kernel from it or unmerge it.

 

That's usually but not necesarily. The best thing is to check your running kernel with "uname -r", then proceeed accordingly. Maybe you should update you your latest updated kernel and only after checking that is is running (boot into it and repeat uname -r) you can remove the rest.

Remember to keep the kernel sources for the kernel that you are running, and not any different version, cause a lot of packages (nvidia-drivers comes to mind now) will search for the sources of the current kernel, and will not compile if they can't find them.

----------

## timeBandit

Also, if you're happy with your kernel and don't expect to recompile it for a while, you should:

```
cd /usr/src/linux

make clean
```

to remove all the compiled object files. These are not needed once a kernel is installed and working. This can free up hundreds of megabytes.

----------

## swp6499

results from uname -r

localhost ~ # uname -r

2.6.17.6

and im still trying to figure out where my hd space went?? anyone think of something we havent covered?? all help is greatly appreciated..

----------

## Headrush

 *swp6499 wrote:*   

> and im still trying to figure out where my hd space went?? anyone think of something we havent covered?? all help is greatly appreciated..

 

We showed you over 1G worth of "extra" stuff already. I don't know what else you are looking for.

The software you installed probably took up the rest of the space. What packages were emerged that caused this increase? (This could be normal)

----------

## rlittle

I'm not good when it comes to cleaning up /usr/portage/distfiles, but mine is 4.8GB.

```
# du -sh /usr/portage/distfiles

4.8G    /usr/portage/distfiles
```

----------

