[ Larry’s note: I received this email March 12 from Tom Harrington, developer of Macaroni, a Macintosh disk utility that I like, and because of it’s significance, I’m sharing it with you. ]
In the March 2004 issue of Mac Home magazine there is a section called “Spring Cleaning”, recommending various methods that can be used to clean out and tune up your Mac. On page 34 is a section marked “Tossing Out Unnecessary Files”. This section recommends that you remove installer receipts from your Mac to save on disk space, because they are “…no longer of use”.
What they fail to mention is that IF YOU DO THIS, YOU WILL NOT BE ABLE TO REPAIR PERMISSIONS ON YOUR COMPUTER ANYMORE. This is true regardless of whether you use Macaroni or Apple’s Disk Utility to repair permissions.
If you have removed these files, there are a couple of things that can be done to restore permission repairs. The easiest is if you (or a friend) have another Mac which still has these files, AND (this is important) that other Mac is running the same version of Mac OS X as you. A receipt file can safely be copied from one computer to another, so, copy the receipts over from the other computer. Put them in the same location on the hard drive where they were found on the friend’s computer, in the Library ==> Receipts folder. If you can’t network the computers, you could also use a CD-ROM for this.
If you don’t have another Mac you can copy the files from, your only real recourse is to reinstall the software that created the receipt files. Since the most important receipts are those created when you install Mac OS X, this does unfortunately mean reinstalling Mac OS X. I hope that by sending this message I’m saving some people the trouble of doing this.
What follows is an explanation of why these files are so important to repairing permissions, for those interested to know what’s going on behind the scenes.
Any time you install software using an Apple-style installer (which includes not only Apple’s own software but other software like Macaroni), the installer creates a “receipt” on your hard drive in the Library ==> Receipts folder. The receipt file looks a lot like an installer package, but it’s not quite the same thing.
Receipts contain information about the files that were installed. Most importantly is a section called the “bill of materials”. This lists every file that was installed along with some information about the file, such as its size and– importantly– the permissions it’s supposed to have.
When you repair permissions on your computer, whether using Macaroni or using Disk Utility, the process is basically as follows: Open up each receipt and look at its bill of materials. Then, for every file in the bill of materials, check to see that the file on your hard drive has the same permissions and owner that the bill of materials specifies. It’s a lot of work because there are a lot of files, but the idea is very simple.
It can be tempting to delete receipt files. But if you do, the permission repair process becomes impossible. There’s simply no way for the program making the repairs to know what the correct permissions are.
In some cases it’s safe to remove a receipt. For example, if you installed an application which you don’t use any more, you don’t need to keep the receipt file around. But in general you need to be very careful in removing these files to avoid making system maintenance impossible.
I hope this has been helpful,
NEW & Updated!
Edit smarter with Larry’s latest training, all available in our store.