Automatically deleting Sims 4 Gallery cache files

Ever noticed that the OnlineThumbbnailCache and Cache folders in your Documents > Electronic Arts > Sims 4 folder gets swamped with small .jpg files after you’ve played your game?

Finder window

That’s because the game has downloaded thumbnails of Gallery items into the onlinethumbnailcache and cache folders for faster loading. Whilst they’re not very big files individually, once you have enough of them they can soon mount up and clog up precious disk space on your Mac. If your Finder window shows All My Files by default (which it will unless you’ve changed it in Finder > Preferences) this can be doubly annoying as after a gaming session all you can see are a ton of .jpg files.

One way to get rid of them is to simply trash the contents of the folders after each game session, it is automatically recreated the next time you load your game so won’t do any harm. Or you can tell your Mac to automatically delete these files as soon as they appear so you never have to worry about them again. The easiest way to do this is to use Automator, an app which is built into OS X/macOS and can be found in your Applications folder. Here’s a video of what I’m talking about – on the right you can see my game window and next to it I have a Finder window open showing my Sims 4 > cache folder (Documents > Electronic Arts > The Sims 4 > cache):

If you would like to activate this action on your Mac simply follow these instructions below. You will need to do this twice, one for the onlinethumbnailcache folder and one for the cache folder:

  1. Go into your Applications folder and open Automator. Automator Icon
  2. If a Finder window opens prompting you to select a file to open just click cancel. Then click on Automator in the menu bar > File > New.
  3. Click on Folder Action from the options then click Choose: Folder Action 
  4. In the next window, under Library, click on Utilities. In the window next to it drag Run Shell Script over to the right hand space: Shell Script
  5. Above the command you just moved there is a dropdown for ‘Folder Action receives files and folders added to...’ Click on the dropdrown and then Other... navigate to your Documents > Electronic Arts > The Sims 4 folder, click on cache then Choose.
  6. In the Run Shell Script command copy and paste the following:

    rm Documents/Electronic\ Arts/The\ Sims\ 4/cache/*.*

  7. Click on Run in the top right corner of the window. You should hear a little chime and see green ticks popping up showing that your command has been successful: Run Shell Script Success If you get the following error message: Shell Script Error It may be because your cache folder is empty. To check, launch your game and open the Gallery. Open the cache folder in Finder and check that the thumbnails have downloaded. If they are now there run the script again. It should be successful.
  8. Go to File > Save to save the Folder Action. You can call it what you like: Save File Name
  9. Repeat steps 1- 8 but instead of choosing the cache folder, choose the onlinethumbnailcache folder. For the shell script copy and paste this into the command: rm Documents/Electronic\ Arts/The\ Sims\ 4/onlinethumbnailcache/*.*
  10. That’s it, finished. Now whenever you access the Gallery in your game the contents of the folders will automatically be trashed without you having to do anything else. You can reverse the command by going into your Library folder (in Finder click on Go in the menu bar, hold down the Alt/Option key then click on the Library folder that appears) navigate to Workflows > Folder Actions and delete the Folder Actions you just created.

7 thoughts on “Automatically deleting Sims 4 Gallery cache files

  1. thank you so much!!!! i’m in the process of deleting all the ea lots and replacing them with new ones so i’m on the gallery a lot and last time I cleared my cache folder it was around 3 GB!!! It’s such a hassle to keep deleting them all the time so this is so helpful!!!!!!! 😀


  2. Hi Bluebell Flora,
    It is possible to use automator to automatically move screenshots into a folder outside the Sim 4?
    Are there any tutorials you recommend?


Leave a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.