Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacBH928

macrumors G3
Original poster
May 17, 2008
8,910
4,021
Hello. I was doing cleaning up and accidentally I deleted a folder called "C" that had a lot of folders that start with "com.apple" and other apps. I tried to undo it I couldn't. After I researched it looks like it came from the "/var/folders/" directory but I do not see a C folder to restore the files in it. I tried to search the backups i have to see where its located, I couldn't find it.

I am not looking forward to break my machine. So far everything works fine and I kept the "C" directory on my Desktop until I know where to restore it. Please help!
 
Don’t worry, those are just temporary folders. macOS recreates what it needs after a reboot.
 
  • Like
Reactions: MacBH928
Don’t worry, those are just temporary folders. macOS recreates what it needs after a reboot.

oh thank god. But why are there files from apps I deleted long time ago??

thank you very much for the help
 
But why are there files from apps I deleted long time ago??
They are part of macOS’ system caches, I’m not sure when or if they are automatically cleared.

"'I've read that "/var/folders" is deleted at startup, but that is not true. The confstr man page said the cache will only be deleted with a safe boot and only files older then 3 days are cleaned out of temp. Either way, you can delete "/var/folders" and reboot whenever you would like without danger of ruining anything."
from https://magnusviri.com/what-is-var-folders.html
 
  • Like
Reactions: MacBH928
They are part of macOS’ system caches, I’m not sure when or if they are automatically cleared.

"'I've read that "/var/folders" is deleted at startup, but that is not true. The confstr man page said the cache will only be deleted with a safe boot and only files older then 3 days are cleaned out of temp. Either way, you can delete "/var/folders" and reboot whenever you would like without danger of ruining anything."
from https://magnusviri.com/what-is-var-folders.html

thanks, I greatly appreciate your help!
 
  • Like
Reactions: bogdanw
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.