Skip to main content
Solved

delete Package Receipt records

  • February 26, 2024
  • 8 replies
  • 160 views

Forum|alt.badge.img+2

hello, I have removed applications manually from the computer, in this case it is oracle, but in the jamf console for some reason it still appears in Package Receipts, what can I do so that these records no longer appear, what should I delete?

at the moment I have these records, but I have deleted everything but I still have these records, in the MAC where can I go to delete so that they no longer appear to me.

com.oracle.jdk-11.0.14
com.oracle.jdk-17.0.5
com.oracle.jdk8u321
com.oracle.jre

Best answer by sdagley

@duvancardenasg Package receipts are stored in /private/var/db/receipts - for each package installed there will be .plist and .bom files corresponding to the package id

8 replies

sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • Answer
  • February 26, 2024

@duvancardenasg Package receipts are stored in /private/var/db/receipts - for each package installed there will be .plist and .bom files corresponding to the package id


talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • February 26, 2024

Here's a simple one-line command to forget a package receipt:

/usr/sbin/pkgutil --forget receiptName


Forum|alt.badge.img+9
  • Contributor
  • February 27, 2024

Here's a simple one-line command to forget a package receipt:

/usr/sbin/pkgutil --forget receiptName


This is the way. Also if you need to list all pkg receipts on your system 

/usr/sbin/pkgutil --pkgs


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • February 27, 2024

Thank you very much for the answers, I am trying each of them, as soon as I have a result I will come to confirm what you have told me. I am new to JAMF, is there any command I can run on MAC that will force the computer inventory update to JAMF?


sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • February 27, 2024

Thank you very much for the answers, I am trying each of them, as soon as I have a result I will come to confirm what you have told me. I am new to JAMF, is there any command I can run on MAC that will force the computer inventory update to JAMF?


Run the following in Terminal:

sudo jamf recon


Forum|alt.badge.img+4

Run the following in Terminal:

sudo jamf recon


Hi there @sdagley  :)

So I am running into an interesting one. I am deploying a set of python scripts which obviously requires Xcode Command Line Tools to be installed. However, I would like to clean up Xcode CLT afterwards. The problem is that /usr/sbin/pkgutil --pkgs lists all the receipts, but when I try to --forget them I am unable to:  "Unknown error Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"."

When I try to find the location of the .plist and .bom files associated I see that they are not actually being stored in /private/var/db/receipts rather they are stored in /Library/Apple/System/Library/Receipts (which are SIP-protected); therefore, I am unable to forcefully rm -rf them. I know apple documentation says that rm -rf the /Library/Developer/CommandLineTools directory uninstalls them, but the receipts remain and are still showing up in device inventory in Jamf Pro. Any ideas about how to overcome this issue? (Without having to disable SIP or go into recovery mode..)
Thanks!


sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • May 20, 2025

Hi there @sdagley  :)

So I am running into an interesting one. I am deploying a set of python scripts which obviously requires Xcode Command Line Tools to be installed. However, I would like to clean up Xcode CLT afterwards. The problem is that /usr/sbin/pkgutil --pkgs lists all the receipts, but when I try to --forget them I am unable to:  "Unknown error Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"."

When I try to find the location of the .plist and .bom files associated I see that they are not actually being stored in /private/var/db/receipts rather they are stored in /Library/Apple/System/Library/Receipts (which are SIP-protected); therefore, I am unable to forcefully rm -rf them. I know apple documentation says that rm -rf the /Library/Developer/CommandLineTools directory uninstalls them, but the receipts remain and are still showing up in device inventory in Jamf Pro. Any ideas about how to overcome this issue? (Without having to disable SIP or go into recovery mode..)
Thanks!


@wewenttothemoon I think you're stuck with those receipts


Forum|alt.badge.img+4

@wewenttothemoon I think you're stuck with those receipts


@sdagley Yeah, I figured. Someone sent me this on the mac admins slack to try out https://github.com/macadmins/python 

Thank you @sdagley