Is there a concept of an uninstaller on a Mac?

Or perhaps a way to take an action if your program dragged to the trash can or being deleted?
The reason I ask this is that my app installer puts files in a few places in the system and I would like to cleanup if my app is being deleted / thrown in the trash. On Windows you have the Add/Remove programs, and on OS X you just have installer packages, but no uninstaller mechanism that I know of.

TheSilverHammer wrote:
I am not sure what a BOM is. I just used the basic package maker tool and wrote a simple pre and postflight script.
It is a Bill Of Materials file. PackageMaker creates them as part of your installer package. The Installer saves them in your Receipts folder so that (non-Apple) tools can clean up later. The important thing is that you can create files in your installer scripts, but there will be no record of files created that way. If you make sure they are in the BOM, they can be found and cleaned up later. You can even have the BOM version an empty stub file and then flesh it out with the scripts, just make sure it is in the BOM.
There is an "lsbom" command line tool you can use to inspect BOM files with.
The thing is, I edit some PList files which would need to be unedited, not simply deleted. I do not think there is harm in leaving this extra stuff, like launching a program that isn't there (there is a check before the attempt) in a script in /etc. I just do not like leaving junk on people's system.
I recommend you do not edit files that aren't your own. There is no way to be sure you can successfully un-edit them automatically. Whomever really owns that file could have edited it after your app did. If you then try to edit it again, you could render some part of the system inoperable. If you want to elaborate on this topic, there might be alternatives.
Like I hate it when you uninstall a game or something on windows, and after it's done in your users directory there is a folder for some game data with 128 megs of junk in it. Actually the other day on my windows box, I noticed a UO Kingdoms folder. I had uninstalled that several months ago. I checked with the add/remove programs and it was not listed. So I looked at the dirs, (it had two of them) and the total was over 200 megs of data. Sure, I have 250 GIGs of space, but still. It just rubs me the wrong way.
A decent uninstaller should at least ask you if you want to delete these files. Speaking of Windows, look at InnoSetup for an example of what a really good installer builder would look like. It pleases me when multinational corporations are so thoroughly bested by one guy with some freeware. I just wish he would port it the Mac.
It seems from what you have said, the answer is no, simply because the average mac user probably will not be using a 3rd party uninstaller.
This is a bit of a speculation, so it may be against the TOS, but the installation architecture could be changing over the next couple of years. Apple no longer recommends the old "drag-n-drop" installers that work so well. They now officially recommend people use the horrible PackageMaker. I think the idea is to improve security using signing certificates and such. I would mind that so much if there was an official uninstaller architecture too. Any time you give some random installer package your admin password, there is no limit (literally) to what that thing could install. Then, if you try to drag the app into the trash, it could easily leave your system completely dead. Things are a mess right now.

Similar Messages

Maybe you are looking for