What are the private var folders in the library

Hello all,

Glad to be joining this exciting community. I have my first question I would like to to pose to the power user community:

Recently, I deleted a bunch of apps using a third party software, app cleaner. Pretty solid. What I noticed when it searched my Mac for all the files that it needed to remove, it found some files in a folder in my library labeled as private/var. The final folder in the path was actually the C folder. As I saw this folder I became worried that I was actually deleting a folder/files that were important to the core MacOS. So… my question is, does anyone know what these folders are? Is is safe to delete these files? Also, does anyone have a sure fire way to delete software from your Mac so that all the pesky, hidden files are also removed?

Thanks!

I certainly wouldn’t recommend deleting all files in private/var!! Lots of important stuff in there. Without knowing the entire path, it’s impossible to know what this app was trying to delete and whether it is ok to delete.

2 Likes

Ditto on not removing anything in private/var or /System or /Library. And I’d be careful in the ~/Library (your user library folder) as well.

As far as deleting hidden files, I don’t know of a way to ensure that every single file of an app is deleted. Some apps create files after they are run. When deleting, I would err on the side of caution. If you aren’t sure if a file is necessary, leave it.

Some apps come with uninstallers. Suggest using that when available.

Years ago, there was an app that you could run prior to installing an app; it would track every single file that was created when installing. But, as I said earlier, some apps create other files when running the app after installing it.

Maybe looking into sandboxing might be useful.

If you are a Hazel user, I found it does a good job of cleaning up after you delete a program. I’ve done my share of manual cleanup over the years using the command line. Unless the program stores a lot of data in your user/Library folder, like email, evernote, etc. most of the time the leftovers are normally small text files that you can ignore, IMO. I would recommend avoiding manual deletions, outside of your home directory, unless you are pretty familiar with a unix system. That way, if you happen to hose something up, like I may have done once or twice in the past :slight_smile: you can usually recover the data from your backup.