/usr full

Hi all,

FreeBSD 7.1-RELEASE-p4

I have problem that /usr is full.
It seem to be the /usr/lib that is the problem.

Any sugestion for a cleanup?

Jan
 
I have cleanup some files.

Code:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/da0s1a    496M    391M     65M    86%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/da0s1e    496M     12K    456M     0%    /tmp
/dev/da0s1f    9.0G    7.6G    648M    92%    /usr
/dev/da0s1d    1.2G    295M    830M    26%    /var
 
janroc said:
I have cleanup some files.

Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 496M 391M 65M 86% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 496M 12K 456M 0% /tmp
/dev/da0s1f 9.0G 7.6G 648M 92% /usr
/dev/da0s1d 1.2G 295M 830M 26% /var

check your home directory
 
If you have ports-mgmt/portupgrade installed, you can run portsclean -CDiLP to delete obsolete distfiles, libraries and eventually built packages.
You can also try sysutils/libchk to spot unreferenced libraries.
And ports-mgmt/pkg_cutleaves will list leaves packages, so you may check if there is something you are not using and that you can delete.
 
You first need to know where those gigas are being spent. Run the following:

Code:
# cd /usr
# du -h -d 1

This will print with one depth the size of directories in /usr.
 
tangram said:
You first need to know where those gigas are being spent. Run the following:

Code:
# cd /usr
# du -h -d 1

This will print with one depth the size of directories in /usr.


Nice command thank you.
1Gb free now.
 
to delete distfiles
Code:
cd /usr/ports/distfiles
rm -R *
you can delete obj files if you have recompiled system from sources
Code:
cd /usr/obj
chflags -R 0 *
rm -R *

also you can clean ports (in case you for got to do that)
Code:
cd /usr/ports
make clean

if that is not enough you can remove /usr/src, if you don't need it
Code:
rm -R /usr/src



If you want to increase partition size make backups change size and restore from backups

How to backup and restore:
http://forums.freebsd.org/showthread.php?t=185

Simple way to make gpt partitions (i like pgt, i really do)
http://forums.freebsd.org/showthread.php?t=1305

and if you want i can explain how to use bsdlabel to change partition size in old fashion, but I don't know how to use fdisk.
I really hate FreeBSD fdisk utility
 
Back
Top