|
Ever wonder what actually got installed on your Macintosh when you applied an Apple Software Update, installed an application, or applied a patch? Ever need to "completely remove" a Mac OS X application but weren't sure how to find everything it installed (not everything goes in the "Applications" folder!)? This article will help you solve that little problem.
Most installers, especially Apple's own, save some files in the "/Library/Receipts" folder on your Macintosh during installation. The purpose of these files is to identify which files are associated with which installation, and to give OS X information about what UNIX permissions should be in effect for a given file. The permissions information comes into play when you use the Disk Utility's "Repair Permissions" function. If the permissions that the package in "/Library/Receipts" says a file should have aren't the permissions it actually has, Disk Utility will change its permissions to match what the package tells it should be used. That's one reason why this is a critical location to include in backup and recovery. Suppose that you've tried to uninstall (or simply use) an application and couldn't. You've tried everything you know and there still seems to be a problem. You suspect that the application has left some files behind, but you don't know what they are. How can you be sure? Launch a Terminal window (Terminal is found under "/Applications/Utilities"). A prompt similar to the following will appear: Last login: Mon Oct 17 13:03:24 on ttyp1 Welcome to Darwin! PowerMac-G4:~ mike$
Change to the "/Library/Receipts" directory and list the files found there: PowerMac-G4:~ mike$ cd /Library/Receipts PowerMac-G4:/Library/Receipts mike$ ls -la total 256 drwxrwxr-x 73 root admin 2482 Oct 17 13:00 . drwxrwxr-t 47 root admin 1598 Oct 17 13:00 .. -rw-rw-r-- 1 mes27 admin 21508 Oct 17 13:01 .DS_Store -r-------- 1 root admin 0 Oct 13 16:00 .SetupRegComplete drwxrwxr-x 3 root admin 102 Oct 14 14:55 ActivePerl-5.8.pkg . . <lines snipped here to reduce article length> . drwxrwxr-x 3 root admin 102 Oct 13 16:27 iTunes.pkg drwxrwxr-x 3 root admin 102 Oct 13 16:13 iTunesX.pkg For this example, we'll look at what was installed on our system when we installed "ActivePerl-5.8", so we will change to the "ActivePerl-5.8.pkg" directory (package files aren't really files but directories in disguise) and list its contents: PowerMac-G4:/Library/Receipts mike$ cd ActivePerl-5.8.pkg PowerMac-G4:/Library/Receipts mike$ ls Contents PowerMac-G4:/Library/Receipts mike$ cd Contents PowerMac-G4:/Library/Receipts/ActivePerl-5.8.pkg/Contents mike$ ls Archive.bom Info.plist PkgInfo Resources
The file that interests us most at this point is the "Archive.bom" file, which contains a "bill of materials" list of what was installed by the installer. If we tried to look at this file in TextEdit or a similar editor, it would look like the following gibberish:
Fortunately, OS X includes a utility that will provide a readable list of the files installed in a given bill of materials file: PowerMac-G4:/Library/Receipts/ActivePerl-5.8.pkg/Contents mike$ lsbom Archive.bom -pf . ./bin ./bin/GET ./bin/HEAD ./bin/POST ./bin/SOAPsh.pl ./bin/XMLRPCsh.pl ./bin/a2p . . <lines snipped here to reduce article length> . ./man/man3/threads.3 ./man/man3/threads::shared.3 ./man/man3/utf8.3 ./man/man3/vars.3 ./man/man3/vmsish.3 ./man/man3/warnings.3 ./man/man3/warnings::register.3
This rather lengthy last details every file installed with ActivePerl 5.8.7. If we were attempting to manually remove ActivePerl from our system, we would need to locate and remove all of these files. At that point, the application should be completely gone.
Related Blogs:
Related Links:
|