I was investigating why a TeamCity build-agent was running out of disk, and found over 11,000 files in /private/var/tmp
, all named along the lines of Untitled-<random-unique>.uicatalog
.
Each file is at least 0.6MB. The total disk footprint is on the order of 4GB.
The files dated back several months, so they survived reboots.
Who is creating them?
Xcode creates these when compiling an xcassets catalog that has at least one image in it.
AFAIK, yes.
If you don't have many of them, you can delete them with rm /private/var/tmp/Untitled-*.uicatalog
. If you have more than N, the wildcard on the previous command will expand to more characters than bash allows. In that case, use ls /private/var/tmp/Untitled-*.uicatalog | parallel rm
.
BTW, they are owned by the user that run Xcode, which is probably you. If not, use sudo
in the preceding.
As of OS X 10.11.3, the system isn't configured to clean /private/var/tmp
. You can check if that's the same for you by running for P in daily weekly monthly; do sudo periodic -${P}; done
and seeing if the files go away. Be aware, the periodic daily script (found at /etc/periodic/daily/110.clean-tmps
) only deletes things that were created 3 or more days in the past, and ls
doesn't show you create-time.
If you want to add the /private/var/tmp
directory to the list of directories cleaned by periodic
(see man periodic
), do the following:
echo 'daily_clean_tmps_dirs="/tmp /var/tmp"' | sudo tee -a /etc/periodic.conf.local
To see it work, run sudo periodic daily
. Everything in /private/var/tmp
that was created 3 or more days ago will be deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With