I have this folder
/private/var/folders/bf/ with 3GB of what seems temporary files. Can I delete this folder?
You can safely delete anything in
/private/var/folders/ but not the folder itself
sudo rm -rf /private/var/folders/*
Quit all apps before you do & reboot afterwards … and whatever you do, don't touch anything else in
/private/var/, and do not delete
Rumor has it that one should not delete
/private/var/folders/zz. This article implies otherwise, but if you want to be on the safe side, use
cd /private/var/folders for i in *; do if [ "$i" != "zz" ]; then sudo rm -rf "$i"; fi; done sudo rm -rf zz/*
From a general safety for the system integrity viewpoint:
Anything withinin the hierarchy of
/private/var/folders/* can be deleted.
But a restart should reduce the amount of temporary files and data in there anyway.
Quitting well written applications does that too, as should a quick logout-login cycle.
The system will repopulate an empty
/private/var/folders/* after it reboots.
From a practicality and consequences for the users viewpoint:
There is a small catch: it is probably not completely without side-effects to just wipe all and anything under
Although theses side-effects are few. Force deleting everything with
sudo rm is possible but not the best option on a live system.
Some of those files might be currently in use. Thus making it difficult or unwise to just delete them all from a running system if one feels the need for that. You'd have to quit the processes using them first. This quitting the process is in itself, as stated above, often enough to have those files removed automatically. If some databases, mainly generated by Apple processes, grow out of hand it might be necessary to move them to the trash, logout-login and then delete them.
A small number of applications or services may store some of the preferences there.
One example is NotificationCenter (NC) with your settings in there: your choice of applications and what of them to be 'in' there. NC rebuilds its preferences with everything in NC enabled. If you have many Apps and prefer most of them to not disturb you this is quite annoying even if only done once.
But then it is not really essential data that gets lost in this way. Since this practice is highly non-standard, it looks only Apple violates its own guidelines: I can't remember any third-party application storing important, not-supposed to be volatile, and non-temporary data in this hierarchy.
Therefore it is best to locate which of these folders belongs to your most active user, go in there and look for the biggest offenders to delete them manually. It is also prudent to learn which of your apps leave so much stuff behind. Quitting and restarting an actively cluttering app might often be enough to gain some space there. If the second catch is of concern, spare those files related to e.g. NC from deletion.