Can I delete contents of /private/var folder?

I see that it takes ~4G space

enter image description here

I have MacBook Air and wanted to check if it is safe to delete the folder

1

3 Answers

No, it is not safe to delete the contents of this folder. Among other things, the /private/var/db/dslocal folder contains the database of users and groups on your computer, so deleting this would leave you unable to log in (and probably make the computer unable to boot). Some specific subfolders of /private/var may be safe to empty, but many will simply be recreated. See, for example, the question about /private/var/vm that ben linked.

It is not safe to delete it, as /private/var can be used by several applications and services.

Some of the files can be deleted only after stopping certain services/daemons or after rebooting your Mac.

Therefore you should check the content of it and find the folders which are used the most, and decide separately.

For example:

yes - it is safe. My clean-up scrip uses:

sudo rm -rf /private/var/folders/*

You'll have no issues after deleting the contents of var/folders - except maybe a faster machine

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like