Is there a jamf binary command to forget Casper receipts residing in /Library/Application Support/JAMF/Receipts/, in the same way that Apple's pkgutil --forget <receipt> command removes receipts residing in /private/var/db/receipts/?
Don't think so. But... sudo rm -Rfd /Library/Application Support/JAMF/Receipts/package_receipt.pkg; sudo jamf recon works. :)
Yep, BFH can work, but I was hoping to be able to selectively delete (pkgutil --pacakges to list, pkgutil --forget <yadayada> to remove). :)
Okay, then how about:
ls -la /Library/Application Support/JAMF/Receipts/
sudo rm -Rfd /Library/Application Support/JAMF/Receipts/yadayada.pkg; sudo jamf recon
:-)
OK, if JSS only cares about the receipts that are present, IOW, no database history of what was installed, I guess a BFH will work. :)
Don, as far as I can see, doing pkgutil --packages / lists all the stuff that resides in the /Library/Application Support/JAMF/Receipts/ folder as well as items installed via the regular OS installer. That command finds all package receipts on the drive, regardless of where they live. Only issue is, it doesn't show a distinction between the ones in the JAMF folder as opposed to other location. If it showed the path to the receipt it would be easy to parse out but from what I can see there is no way to get it to do that. Adding --verbose doesn't help :/
That said, really a simple ls -l /Library/Application Support/JAMF/Receipts/ should work on listing out what's there. From there you can just target the package you want to remove, no?
If the ls command doesn't thrill you, try using Spotlight's API. I just recently began playing around with that stuff and am finding it to be pretty powerful.
mdfind -onlyin /Library/Application Support/JAMF/Receipts/ "kMDItemContentType == 'com.apple.installer-package-archive'"
That will give you a nice neat list of all the actual receipts in the /Library/Application Support/JAMF/Receipts/ folder, including the full path. It would be easy to pull one of those and use it with a remove command after. The nice thing about using Spotlight to list specific file or content types is it will not include anything that happens to be in that folder that isn't a true package receipt.
Edit: updated command
Steve, Mike, both of your suggestions work. Thanks!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.