Skip to main content
Solved

Cached software question


Forum|alt.badge.img+7

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?

Best answer by mm2270

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 original
Did this topic help you find an answer to your question?

3 replies

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • Answer
  • January 28, 2015

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.


Forum|alt.badge.img+7
  • Author
  • Contributor
  • 28 replies
  • January 28, 2015

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


Forum|alt.badge.img+7
  • Author
  • Contributor
  • 28 replies
  • January 28, 2015

Worked like a charm. Thanks again!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings