• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved Is it safe to clean /var/db/freebsd-update/files ?


Well-Known Member

Thanks: 91
Messages: 321

I've got 107954 files taking up almost 2G of space in the /var/db/freebsd-update/files directory, which I'm assuming are leftovers from performing freebsd-update during the various FreeBSD 10-RC upgrades. Is it safe to remove these? With the ability to rollback an upgrade (using freebsd-update rollback), I'm guessing that this is where that rollback information is saved. I don't see a need to keep all that if I'm past the point of ever wanting to rollback. Perhaps a "cleanup" command needs to be added to freebsd-update.


Son of Beastie

Thanks: 1,279
Messages: 2,707

It's all in the freebsd-update(8) manualpage ;-)

Yes, the directory you're referring to here is the so called working directory, which you can also specify yourself by using the -d commandline parameter. As you guessed yourself; this is the place where temporary files and downloaded updates go. So if everything went well it should be safe to simply clean this one out.

As to your idea; I'd suggest to create a Problem Report (PR) for that, if one doesn't exist yet (seems that it doesn't). Just be sure to be precise and descriptive with your suggestion and also mark it as a request for change.


New Member

Messages: 10

I also desire to have freebsd-update keep it's self tidy

I checked man freebsd-update and there was no mention of a clean function


Active Member

Thanks: 25
Messages: 168

I stumbled on this thread from the main menu of the site (right side) and noticed I also have 1.8 gb of files in this directory. Interestingly enough rm could not remove them because there were too many files so I ended up deleting the /var/db/freebsd-update/files directory itself then re-creating it and setting the appropriate permissions. Apparently rm has a parameter limit ;)


Aspiring Daemon

Thanks: 132
Messages: 855

Apparently rm has a parameter limit ;)
When I expereince that I just modify my parameter, and do a rm a few times. Something like this for example:
rm a*
rm b*
rm c*

or for example
rm 201609*
rm 201610*
rm 201611*

I'm guessing there is a way that you don't need to do that, but that is what I do, and its a good way to practice syntax with wild-cards.


Staff member

Thanks: 6,127
Messages: 27,000

A little slow but works: find /var/db/freebsd-update/files/ -type f -delete


New Member

Thanks: 2
Messages: 11

Why remove just files when the whole directory can be cleaned?

rm -r /var/db/freebsd-update/*

Works great.


I see it now - you wanted to keep the rollback data. But I don't plan on rolling back so my way works fine for me.