Cached software question

robby_barnes
New Contributor III

Hey,

So I'm curious about if there is a way to flush an existing cache through the JSS itself, without having to go through a terminal command.

Here's my situation. I had 10.10.1 cacheing on all computers running 10.9.x, and now that 10.10.2 has come out, I would love to just clear that out and have it cache 10.10.2 instead. Is there a relatively simple way to do this?

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

Unfortunately I don't think there is any built in function for this. The best you can do, at least in terms of keeping it simple, would be to create a Smart Group capturing any Macs with that pkg in the Waiting Room directory (something like Packages cached by Casper | has | <package name>), then create a policy that uses the Advanced command run function and does something like:

rm -Rfd /Library/Application Support/JAMF/Waiting Room/<package name>

It should only execute on Macs that have that pkg on them and delete only that package. You just need to make sure you use the correct pkg name.
And be sure to have the policy collect new inventory after so it moves the Mac out of that Smart Group.

Another option would be to do a Before script like the above and set it as part of your 10.10.2 caching policy. It should run, delete any instances of the older pkg and then cache the new one.

View solution in original post

3 REPLIES 3

mm2270
Legendary Contributor III

Unfortunately I don't think there is any built in function for this. The best you can do, at least in terms of keeping it simple, would be to create a Smart Group capturing any Macs with that pkg in the Waiting Room directory (something like Packages cached by Casper | has | <package name>), then create a policy that uses the Advanced command run function and does something like:

rm -Rfd /Library/Application Support/JAMF/Waiting Room/<package name>

It should only execute on Macs that have that pkg on them and delete only that package. You just need to make sure you use the correct pkg name.
And be sure to have the policy collect new inventory after so it moves the Mac out of that Smart Group.

Another option would be to do a Before script like the above and set it as part of your 10.10.2 caching policy. It should run, delete any instances of the older pkg and then cache the new one.

robby_barnes
New Contributor III

Good idea. I'll give that a try. Thanks

robby_barnes
New Contributor III

Worked like a charm. Thanks again!