Clear Mac App Store Temp Cache to Fix Some Download Issues
Rarely, the Mac App Store may report erroneous app download statuses or even offer a malformed file leading to an app that doesn’t launch or is partially downloaded. These situations are almost always the result of an interrupted or corrupted download, but can occur in some other scenarios as well.
Sometimes simply deleting the app in question can resolve any surrounding difficultly, but on some occasions that isn’t possible or isn’t effective. These type of unusual errors can typically be resolved by manually clearing out the Mac App Store cache, and then re-downloading the app, or re-visiting the Mac App Store. This tutorial will walk through completing that process.
Accessing the Mac App Store Temporary Download Caches
Be sure to backup your Mac before beginning this process, it’s unlikely something will go wrong if you follow the instructions but because you are editing a system level cache directory it’s always good practice to backup and be sure your data is safe. Don’t skip backing up.
- Quit out of the Mac App Store
- Open the Terminal, found in /Applications/Utilities/ and type the following command exactly:
- Hit Return and the com.apple.appstore folder will open in the Finder of Mac OS
- Move the contents of this folder onto the desktop of the Mac (or if you are confident, move the contained temporary data into the Trash)
- Importantly, do not delete or adjust any other files outside of this directory, when finished close the com.apple.applestore folder
- Relaunch Mac App Store
Now you should be able to download or re-download the apps or Mac OS installer files again, and they should work properly as intended.
This process can help if you’re unable to download something from the Mac App Store, if it’s showing up erroneously as downloaded when it’s not, or if there are constant verification errors or other problems with the downloaded app or installer file. For example, you may need to do this if you notice that the Mac App Store is persistently showing a Mac OS installer as “Downloaded” despite not having completed the download as discussed in this Sierra troubleshooting detail. If you delete the temp cache data, it will allow you to re-download that Mac OS installer again in such a situation.
This troubleshooting trick will not resolve user level cache issues with the App Store, which are typically superficial behavior like the App Store not loading pages or behaving in an inordinately slow manner.
For those wondering about alternatives that do not involve the command line, you can also approach this temp cache directory through the Mac App Store “Debug” menu, but the latest versions of Mac OS and Mac App Store do not seem to support the current defaults write command to reveal the option. If you happen to know an updated defaults string that works with modern Mac OS releases, be sure to leave a comment.
Fingers crossed, this seems to have fixed my runaway appstore processes running up to 300% with memory leaks blowing past 2GB in a few minutes, while trying to melt down my 15″.
It seems that the App Store temporary files are now being stored at $TMPDIR../C/com.apple.appstoreagent/com.apple.appstore with folders that look like 3C42AB6D-B53F-433F-831F-B8EFB5683FD5
These UID named folders are apparently the half-downloaded files from the App Store app and are the folders that need to be deleted to remove space in low disk space conditions. To be sure, you can always use du -s * on the folders in this directory to see how much space they are consuming.
I still don’t understand why Apple can’t have its own apps clean up after themselves in cases of crashes or cancelled downloads.
No need for Terminal.
This simple script does the job.
set p2t to path to temporary items from local domain
tell application “System Events”
set p2appStore to (path of container of container of p2t) & “C:com.apple.appstore:”
tell application “Finder” to open p2appStore
What’s the difference between the 0, C, and T folders in the parent of $TMPDIR ?
T is for temporary, C is for cache, and 0 is for launch services.
Step 3 folder name should read “com.apple.appstore”, as in the Terminal and Finder screen shots.