How to access the var folder on a Mac?

What is a var folder?

Although there is little in the way of documentation online, it’s clear that the var folder was designed to improve operating security. It was designed to improve permissions (rwxr-xr-x) over previous temp and cache locations, such as the /Library/Caches and /tmp folders. According to Apple developer information, the var folder is a reference to “per-user temporary files and caches.”

What this means is, this is a temporary or cache file that is not in the Home folder. This way, cache data - which Apple is keen to store - is not transferring data over a network. It is making cache data more secure, and keeping everything in one place, instead of scattered around multiple files and folders.

Var folders store an awful lot of data. Although there are some suggestions that these folders are emptied every three days, other research into this suggests that that isn’t true and you could be at risk of a huge cache of data sitting on your hard drive, and some of that might contain personal user information. Instead of letting that simply sit around and take up space, some users choose to locate and delete the cache of data every few weeks or even days.

Another step you can take if you’re concerned about a potentially enormous store of cache data taking up space is to download and use CleanMyMac X. Using the Space Lens tool, you can quickly see what is taking up too much space on your Mac and how to safely reclaim that much-needed space, thereby improving how well your Mac performs.


How to access the var folder?

One of the easiest ways to permanently uncover the var and other hidden folders is to use Terminal

  1. Go to Terminal - in the Utilities folder.
  2. Type in the following command: defaults write com.apple.Finder AppleShowAllFiles YES
  3. Now Reinitialize the Finder, either by rebooting or clicking the Finder while holding down the Option key, then selecting “Relaunch.”
  4. Now this should show every hidden folder, including var.
  5. Once you are ready to hide them again, go to Terminal and input the following command: defaults write com.apple.Finder AppleShowAllFiles NO

 Another way to access the var folder is using the Finder.

  1. Open Finder.
  2. Press Command+Shift+G to open the dialogue box.
  3. Input the following search: /var or /private/var/folders
  4. Now you should have temporary access, so you should be able to drag it into the Finder favourites if you want to access it again.

Either way, now you should be able to gain access to the hidden var folders. With this access, you can delete any unwanted cache files that are taking up too much space. But always be careful when deleting anything: if you aren't sure what it does, it is probably best to leave it alone. Reboot or restart your Mac, as that should automatically clear out bloated cache files and folders.


How to access all your folders with Space Lens

One way that you can reliably gain the space and processing power needed to improve the performance of your Mac is by downloading CleanMyMac X. It has the Space Lens tool that can build your storage map in a matter of seconds and show you all the files and folders on your Mac.

  1. Download CleanMyMac X (it has a free trial version).
  2. Launch the Space Lens. 
  3. Click Scan.
  4. Review your files and folders.
  5. Tidy up any space hoggers.

Enjoy using CleanMyMac X and make your Mac cleaner, faster, and safer.

CleanMyMac X
CleanMyMac X

Your Mac. As good as new.