MacOS – What’s the purpose of directory /private/var/db/receipts

macos

I searched and found several steps to remove the redundant files.
Then I found in /private/var/db/receipts there are many config like files, Anyone know the purpose if this directory?

Best Answer

Files in /private/var/db/receipts are...well...receipts for packages/apps you have installed on your Mac. They list what was installed and when. The Plists also include version information. For example heres an example of my plist for Xcode (com.apple.pkg.Xcode.plist):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>InstallDate</key>
    <date>2018-06-05T18:36:40Z</date>
    <key>InstallPrefixPath</key>
    <string>/</string>
    <key>InstallProcessName</key>
    <string>storedownloadd</string>
    <key>PackageFileName</key>
    <string>Xcode.pkg</string>
    <key>PackageIdentifier</key>
    <string>com.apple.pkg.Xcode</string>
    <key>PackageVersion</key>
    <string>9.4.0.0.1.1526532315</string>
</dict>
</plist>

I don't think it has anything to do with MySQL.