clearing space in /usr

Dominic Mitchell dom at happygiraffe.net
Fri Jun 15 10:15:31 BST 2001


On Thu, Jun 14, 2001 at 05:58:41PM -0400, Will Macdonald wrote:
> I everyone...
>
> I have a fairly capable machine at work with 4.2 installed. I was
> trying to work out how to upgrade the some of the ports, and read in
> the handbook about using CVSup. Which I ran.
>
> Everything seemed to go OK, but I realise this wasn't what I really
> needed to do. I have now used a fairly large chunk of disk space in
> the /usr partition.
>
> Is there any way I can claim this back safely ?? It used to be about
> 25% full and is now 75%.

Ummm, If you've been building ports, then there may well be a lot of
"work" directories left over.  Try this to clean up your port builds:

	# find /usr/ports -type d -name work | xargs rm -rf

Also, there may well be a whole buncha stuff in /usr/ports/distfiles
which can probably go unless you're planning on rebuilding the ports.

The other thing to check is that when you cvsup'd you probably cvsup'd a
whole load of extra ports like /usr/ports/japanese/* and so on which
you'll never need.  Nuke 'em and put 'em in the cvsup refuse file.

Do bear in mind that a full ports collection is rather large anyway
these days.  You may want to move the whole lot to another partition and
symlink /usr/ports to it.

Ooh, one last tip: Install /usr/port/sysutils/xdu and run:

	% du -kx /usr | xdu &

It's a very nice way to see where your diskspace has gone.

-Dom




More information about the Ukfreebsd mailing list