Flushing a policy from command line

boberito
Valued Contributor

Is there a way to flush a policy from the command line?

I'm pushing a big package out to each client and the majority it works fine. The package is a 5GB package and most get the package and everything is fine. But some I've noticed the JSS reports as "Completed" but the size might be 1.2G or 4G or whatever size, obviously it didn't complete right.

I've wrote a script that goes and checks the size of the package, deletes the incomplete cached package but now I want to flush the policy from the JSS so it'll try again.

Any suggestions?

3 REPLIES 3

boberito
Valued Contributor

Nevermind....

jamf flushPolicyHistory "policy name"

I was having a total brain fart.

boberito
Valued Contributor

And this doesn't actually do it and I realized there's no way to do this. I wish I could delete my own thread haha

mm2270
Legendary Contributor III

I was going to post to break the bad news to you on this. Glad you figured it out on your own though. You can flush all policies run on a Mac, but not just one from the Mac itself. That's only possible from the JSS web console.
There is a feature request asking to be able to do this. Would be super useful, so I hope JAMF makes it available at some point.