Out of space on my FreeBSD vm

Hi. I have FreeBSD 13.2 installed in VBox and have received the following error:

/usr/sbin/freebsd-update: cannot create filelist: No space left on device
rm: filelist: No such file or directory

I have been aware that my hd space was dangerously low for a while and have tried to find what has been taking up the space but to no avail. (pkg clean, autoremove, etc). This vm was made with 15 GB of space and I only have 2 window managers and some basic software installed. I do have ports installed (for 1 of the wm's) and I suppose it's not a big deal to delete the ports system, but I'd just like to know why I've run out and if there's anything I can do before I take that step.

Thanks.
 
Did you have a look at your /tmp? A default installation will not clear that upon reboot. Some 3rdparty software will happily dump gigabytes of data into there without cleaning up.
The sysctl clear_tmp_enable controls whether /tmp will be auto-pruned on boot.

If you have any databases or similar running on that host you might also want to check those out. Generally, have a look at /var.

du(1) is your friend.
There are also some non-base utilities available to track this down such as sysutils/duf.
 
What I do in such situation is using du -h -d 1 / to dissect most "offending" directories. -h means human readable, -d 1 is directory depth (i. e. count everything in tree and display sum only one step down) and / means start at root of the filesystem. I usually get one or two really big directories like /var or /usr and continuing this way like du -h -d 1 /var leads to discovery like some log file using 20 % of all space or so.

That said, 15 GB for system with GUI is probably little tight by today standards.
 
That said, 15 GB for system with GUI is probably little tight by today standards.
Quite agreed with that. My main FreeBSD VM under VirtualBox has a 50 GiB disk. I think you won't avoid to enlarge your virtual disk.

That said, I recommend you, if you use zfs, to take a look at bectl list and zfs list -t snap.
 
Thanks for all your help, guys. I used bectl list/destroy to reclaim a tonne of space.

Kudos.
 
What I do in such situation is using du -h -d 1 / to dissect most "offending" directories. -h means human readable, -d 1 is directory depth (i. e. count everything in tree and display sum only one step down) and / means start at root of the filesystem.

Yes indeed.

As a refinement, especially with lots of directories rather than -h I usually start with:
du -md1 / | sort -n | tail
to quickly remove most 'noise '.
 
Back
Top