Cache Files consumes a lot of memory. How can I delete them?





It has Free memory in the photo but when I run my project, my project crashes because the required memory exceeds the available. My problem is that the 'Cached Files' Memory does not decrease when my program runs. When I run my project, it increases memory consumption and just crash because of memory shortage without 'Cached File' being adjusted.


Honestly, cached files over 11GB is quite illogical. I don't use other apps except for chrome and vscode but why there's 11GB of cached files? From the Apple's logic that it is for future usage of some apps, 'Cached' should be 0 when I open both chrome and vscode, but it does not.


How can I turn it off? I really need this to turn off. What is the advantage of using 32G ram if 1/3 of it is being not used.

Posted on May 23, 2022 3:23 AM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on May 23, 2022 4:04 AM

Simplest not intrusive way .


Suggest restarting in Safe Mode. This will perform a Disk Repair, clear cache files and only load Apple Software, extensions and fonts. The boot up will be slow and can take some time - Normal.


If, as perviously mentioned, Empty Disk Space is the issue >>


It is suggested to keep at least 15% to 20% of the Drive Total Capacity as Empty Space for good operations of the computer and for additional updates to Monterey to download, expand and install.






Similar questions

2 replies
Sort By: 
Question marked as ⚠️ Top-ranking reply

May 23, 2022 4:04 AM in response to NothingWorksInMac

Simplest not intrusive way .


Suggest restarting in Safe Mode. This will perform a Disk Repair, clear cache files and only load Apple Software, extensions and fonts. The boot up will be slow and can take some time - Normal.


If, as perviously mentioned, Empty Disk Space is the issue >>


It is suggested to keep at least 15% to 20% of the Drive Total Capacity as Empty Space for good operations of the computer and for additional updates to Monterey to download, expand and install.






Reply

May 23, 2022 3:57 AM in response to NothingWorksInMac

Cached files is not your problem, as that is just “FREE” memory that happens to remember what was previously in it and can be either reused if you access that file again or the memory can be repurposed for another tasks needs.


App memory, Compressed memory and Wired memory are the only memory that cannot easily be reused without the need to page to disk. Wired memory being the least available for other tasks.


HOWEVER, if your boot disk free storage is low, that could prevent paging and swapping to disk/SSD/NVMe storage.


but if you want to increase power usage, reduce battery life, and slow down your Mac, then the following command will purge your file system cache


sudo purge

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cache Files consumes a lot of memory. How can I delete them?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.