Content Caching


Hi all, we have content caching enabled on Mac minis in schools, however keep getting an issue where software updates can't install as there is not enough free disk space.

When this happens I try to run AssetCacheManagerUtil flushCache from a policy to clear the cache and make some room but I get the following error from that command:

2020-10-12 12:01:28.762 AssetCacheManagerUtil[59888:582539] Content caching did not flush its cache: Error Domain=ACSMErrorDomain Code=9 "required by your system administrator" UserInfo={NSLocalizedDescription=required by your system administrator}

Should probably point I have no access to these Macs other than with Jamf so looking for idea on how I can do it, without just reducing the amount of disk space I allow for cached content.



Reset the cache and then set the amount of space that can be used for cache. This is the script I used to reset the cache.

serveradmin stop caching
sleep 5
rm -rf /Library/Server/Caching/Data/
sleep 30
serveradmin start caching
serveradmin settings caching:CacheLimit = 450000000000


Hi @ChrisTech , Thanks for this!

We are currently turning on, and configuring, Content Caching with a config profile - will trying to change the settings via this script, I am particularly thinking he limit piece, not get 'trumped' by the setting in the config profile?

Contributor III

@ChrisTech Your script won't work on Mojave+ since (and therefore serveradmin) does not contain Content Caching anymore. And since the OP is using a profile to configure, that means he's on Mojave+.


@patgmac We are indeed on Mojave+, Catalina in fact