On Mon, 8 Mar 2010 01:59:03 +0000 (UTC) roys2...@sdf.lonestar.org wrote: > Hello, > > Can someone please tell me how I can clean my root partition? > > df -h > > Filesystem Size Used Avail Capacity Mounted on > /dev/wd0a 2.0G 2.0G -101M 105% / > /dev/wd0k 830G 84.7G 704G 11% /home > /dev/wd0d 3.9G 40.0K 3.7G 0% /tmp > /dev/wd0f 49.2G 888M 45.9G 2% /usr > /dev/wd0g 2.0G 159M 1.7G 8% /usr/X11R6 > /dev/wd0h 7.9G 2.2G 5.2G 30% /usr/local > /dev/wd0j 3.9G 70.6M 3.7G 2% /usr/obj > /dev/wd0i 3.9G 683M 3.1G 18% /usr/src > /dev/wd0e 7.9G 68.7M 7.4G 1% /var > > When I look in my /root partition, there is only 1mb > > I feel kind of stupid to have to ask such question, > but i simply can't find an answer on the net, > and really don't want to install everything from scratch. > > Regards, > > Roy Stuivenberg. >
You were most likely not paying attention and copied something into your root partition, or you were mistakenly running as the root user all the time. Also, you seem to be confusing your root partition "/dev/wd0a" which contains your root file system "/", with the home directory of the root user "/root/" After a normal installation, you'll have the following in / $ ls -laF / total 41924 drwxr-xr-x 15 root wheel 512 Mar 7 19:04 ./ drwxr-xr-x 15 root wheel 512 Mar 7 19:04 ../ drwxr-xr-x 2 root wheel 512 Feb 2 16:21 altroot/ drwxr-xr-x 2 root wheel 1024 Feb 2 16:23 bin/ -rw-r--r-- 1 root wheel 43604 Feb 11 10:28 boot -rw-r--r-- 1 root wheel 7510284 Feb 11 10:20 bsd -rw-r--r-- 1 root wheel 7529736 Feb 11 10:20 bsd.mp -rw-r--r-- 1 root wheel 6244738 Feb 11 10:20 bsd.rd drwxr-xr-x 3 root wheel 23552 Mar 2 07:00 dev/ drwxr-xr-x 32 root wheel 2560 Mar 2 12:05 etc/ drwxr-xr-x 3 root wheel 512 Feb 23 04:15 home/ drwxr-xr-x 2 root wheel 512 Feb 2 16:21 mnt/ drwx------ 3 root wheel 512 Mar 2 12:00 root/ drwxr-xr-x 2 root wheel 1536 Feb 2 16:23 sbin/ drwxr-xr-x 2 root wheel 512 Feb 2 16:21 stand/ lrwxr-xr-x 1 root wheel 11 Feb 11 10:27 sys@ -> usr/src/sys drwxrwxrwt 7 root wheel 1024 Mar 7 15:27 tmp/ drwxr-xr-x 17 root wheel 512 Feb 2 18:11 usr/ drwxr-xr-x 24 root wheel 512 Feb 23 04:13 var/ I've you've copied a bunch of crap into any of the following directories: / /altroot/ /bin /dev/ /etc/ /root/ /sbin/ /stand/ then you'll run out of space on the root partition. If you don't have a bunch of unwanted files directly under / then you'll need to figure out under which directory you put all the crap. Though it will take a while to run, the following command will show you how many kilobytes is being used by each directory. This must be run as root for it to work. # find -x / -type d -maxdepth 1 -print0 | xargs -0 du -ksx | sort -n 2 /altroot 2 /mnt 2 /stand 16 /root 40 /dev 58 /tmp 4606 /bin 7632 /etc 11574 /sbin 14144 /var 44794 / 472530 /usr 25284058 /home On occasion you *need* to use the root account temporarily, but you should *NOT* be running as the root user all of the time. The home directory of the root user, namely "/root/" should always look about like this. $ sudo ls -laF /root/ total 32 drwx------ 3 root wheel 512 Mar 2 12:00 ./ drwxr-xr-x 15 root wheel 512 Mar 7 19:04 ../ -rw-r--r-- 1 root wheel 22 Nov 10 06:58 .Xdefaults -rw-r--r-- 1 root wheel 578 Nov 10 06:58 .cshrc -rw------- 1 root wheel 125 Nov 10 06:58 .klogin -rw-r--r-- 1 root wheel 328 Feb 11 10:42 .login -rw-r--r-- 1 root wheel 411 Nov 10 06:58 .profile drwx------ 2 root wheel 512 Nov 20 13:46 .ssh/ $ If you've made the mistake of running as the root user, then you've probably got a ton of crap under /root/ which has caused you to run out of space on the root partition. jon