on Mac OS X 10.6 Snow Leopard
September 09, 2009
When you update or re-install a program, the standard Mac OS installer compares the version of the already installed application with the version indicated in the installation package. This version verification prevents the user from installation of the older version of a program. This causes a problem when you need to return to the previous version.
In Mac OS X, including version 10.5, the installer places a *.pkg file into the "/Library/Receipts/" folder. This file is usually named like the installer package. For example, "Disc Cover 2.pkg". Removing this file, you make it impossible to compare the version numbers. The installer passes the verification swimmingly.
On Mac OS 10.6 Snow Leopard, the "/Library/Receipts/" folder contains:
"InstallHistory.plist" seems to contain the information we need. Every time you run installation, a new item is added. If you install a newer version of the program, the information about the previous version will remain in the installation history. Try to delete such a record and you'll see that it doesn't help to clear the history. Obviously, "InstallHistory.plist" is not the replacement for *.pkg files used in the earlier versions of Mac OS.
What we are looking for is located in a hidden folder in the system volume:
To open the content of this folder in Finder:
The installer adds two types of files into this folder:
The file name structure is very similar to the preferences file. For the Disc Cover application, files are named as follows:
This is a sample content of *.plist
To cheat the installer, you can delete the corresponding *.plist file. Note that admin's permissions are required to modify or delete the *.bom and *.plist files.
The "right" way to delete the *.plist files is to use shell (Terminal) commands. To open the Terminal, run the Applications/Utilities/Terminal.app application. Also, you can delete *.plist in Finder. The author doesn't have any information if this can cause any problem in the future.
For an alternative, you can change the version number in *.plist. For example, you had version 1.2.3 of some application. In *.plist, the PackageVersion parameter will be equal to 1.2.3. To install version 1.2, set PackageVersion to 1.0.
The *.plist file is in the binary XML format. To edit it, use the Property List Editor application (it is not included in the default Mac OS installation).
To output the list of all installer package receipts, use this shell command:
The Terminal displays package id this way:
The package id "com.belightsoftware.DiscCover2" corresponds to the "com.belightsoftware.DiscCover2.plist" file.
To output information saved in an installer package receipt:
pkgutil --pkg-info package-id
here and below, "package-id" should be replaced with the actual package name.
pkgutil --pkg-info com.belightsoftware.DiscCover2
To save the content of a *.bom file to a text file "bom.txt", use the lsbom shell command indicating the full path to each file.
lsbom /private/var/db/receipts/com.belightsoftware.DiscCover2.bom > bom.txt
To delete an installer package receipt:
sudo pkgutil --forget package-id
sudo pkgutil --forget com.belightsoftware.DiscCover2
you will be asked for the admin's password.
To access the *.bom and *.plist files in Finder:
Editing and removing files from "/private/var/db/receipts/" is potentially unsafe for the operating system and installed software. The author doesn't take any responsibility for the damage you may cause.
Before editing or removing the *.bom and *.plist files in Finder, change the permissions to "Read and Write". To do this, right-click on a file in Finder. Then select "Get Info" in the pop-up menu. The permissions settings are at the bottom of the panel.
Apple Mailing Lists: Query for package id
© 2016 Nick Shubin. All rights reserved.