How to clean up /

Efraín Déctor efraindector at
Wed Nov 28 23:56:41 UTC 2012

Yes, I installed linux_base sometime ago, and I forgot about it, since I'm 
not going to use it again I uninstalled it and it recommended that the files 
can be safely removed.

Also let me thank you for telling me about how to setup IPFW without 
recompiling the kernel.

Thank you all for your recommendations.

-----Mensaje original----- 
From: Ben Morrow
Sent: Tuesday, November 27, 2012 8:11 PM
To: Efraín Déctor
Cc: freebsd-stable at
Subject: Re: How to clean up /

At  7PM -0600 on 27/11/12 Efraín Déctor wrote:
> From: Ben Morrow
>> Quoth =?utf-8?Q?Efra=C3=ADn_D=C3=A9ctor?= <efraindector at>:
>> >
>> > I recently upgraded to 9.1-RC3, everything went fine, however the /
>> > partition its about to get full. Im really new to FreeBSD so I don’t
>> > know what files can be deleted safely.
>> >
>> > 76M    /compat/linux/usr/lib/locale/locale-archive.tmpl
>> This shouldn't be in /. You should create a new filesystem for /compat
>> alongside /usr and /var, or just make a symlink /compat -> /usr/compat
>> and move everything there.
> I have a custom kernel on this system (for using IPFW) could be this 
> reason
> so compat is there?.

[Do you realise you don't need a custom kernel for ipfw? ipfw is
available as a module, so you can keep GENERIC and put


into /boot/loader.conf. This will cause ipfw to be loaded at boot time,
before the network is started; you can load it at runtime by running

    kldload ipfw


No, this is nothing to do with a custom kernel: it is part of one of the
linux_base ports, which you must have installed. It needs to be where it
is, under /compat/linux, but /compat/linux itself should not be on the
root filesystem.

Since the list of large files you posted is relatively short, I assume
you are using the traditional partioning scheme, with a small root
partition and larger partitions for /usr and /var (and maybe /home).
There is not as much point to this as there used to be, but if you are
going to use this scheme you need to avoid putting anything in the root
partition that doesn't need to be there.

/compat/linux contains libraries, binaries and other files needed for
FreeBSD's Linux API emulation; this most certainly does *not* need to be
in the root partition, so it should be moved somewhere else. There are
two possible 'somewhere else's: you can put it in its own partition,
which means you need to have space on your disk to allocate a new
partition; or you can move the whole lot onto one of your other existing
partitions, and use a symlink (or a nullfs mount, but let's not get
complicated) to make the directory appear where it's supposed to be.

Probably the latter is the easier option. /usr is the right filesystem
to be storing this sort of thing on, so you want to

    mv /compat /usr
    ln -s usr/compat /compat

The mv will take some time, since it is moving files cross-filesystem so
it has to copy them all.


More information about the freebsd-stable mailing list