We've received reports that after following a number of suggestions in a recent article in MacHome magazine, users are no longer able to use Disk Utility's Repair Disk Permission function -- a common maintenance and troubleshooting tool. MacFixIt reader Shawn Lynch writes:
"Following the advice...I emptied the contents of /Library/Receipts to save some space. I don't know if this is connected or not, but since that time I have been unable to repair permissions! It says: Error: no valid packages."
We obtained a copy of the article in question -- the "Spring Cleaning" article in the March issue -- and can confirm that the procedure Shawn described is the cause of this problem. The section of the article to which Shawn is referring states:
- OS X is not quite as flexible as OS 9 when it comes to system components, and as a rule, it's best to avoid mucking about with the System and Library folders. However, there is at least one folder you can empty: Macintosh HD>Library>Receipts. This folder contains installer packages that are no longer of use.
As regular MacFixIt readers may recall, we've covered the /Library/Receipts folder in the past. It doesn't actually contain installer packages; rather, it holds installation receipt packages -- hence the name of the folder -- that provide Mac OS X with detailed information about software that has been installed (mainly Apple software, but also some third-party software).
Besides these files being important to the Installer application and Software Update -- which often use receipts to determine what software has previously been installed and, thus, whether or not an update is necessary or whether or not software required by an installer package is already present -- receipt files are vital to Disk Utility's Repair Disk Permissions function. Specifically, Repair Disk Permissions relies on these receipt files in order to determine the correct permissions for system-level files. If you don't have the appropriate receipt files in /Library/Receipts, Repair Disk Permissions will not be able to correctly repair those permissions. (This is why you should always run Repair Disk Permissions when booted from the volume being repaired -- it uses the contents of /Library/Receipts on the boot volume to determine the "correct" permissions.)
However, even more significant, if the BaseSystem.pkg and Essentials.pkg receipt files are not present in this folder, the Repair Disk Permissions function may refuse to run at all, presenting the message quoted by Shawn: "Error: no valid packages."
Despite the suggestion made in the MacHome article, users should not remove files from /Library/Receipts unless they have a very specific reason to do so. (Potential reasons for why you might do this are beyond the scope of this report; if you're interested in the nitty-gritty behind installer and receipt packages, one of the best discussions available can be found in MacFixIt founder Ted Landau's upcoming book, Ted Landau's Mac OS X Help Desk.)
We have notified MacHome about this issue so that they can update their readers with the correct information.
Unfortunately, if you've already followed this procedure and are now in a position where you cannot use the Repair Disk Permissions function, getting that functionality back is not a simple procedure. If you have another Mac that has the exact same version of Mac OS X, and all the same subsequent updates, installed, you may be able to copy the BaseSystem.pkg and Essentials.pkg receipt files from that Mac to the one suffering from missing receipt files. However, although this may allow you run Repair Disk Permissions, doing so may not accurately repair system-level permissions since your Mac will still be missing many of the receipt files necessary for accurate permissions repairs. If it's important to you to be able to run Repair Disk Permissions and get the full benefit of its repair routines, you may want to consider an Archive and Install of Mac OS X from the OS X Install discs, using the "Preserve Users and Network Settings" option. Doing this, and then installing all subsequent updates, will provide you with all the appropriate system-level receipt files.
Note: In the interest of full disclosure, we note that a member of the MacFixIt editorial staff writes for Macworld magazine, which competes with MacHome.