Thursday, February 21, 2008

Firebird and MacOSX Uninstalls

MacOSX doesn't have an uninstall utility.
I use the following script to clean up Firebird installs on Leopard.
It should work on Tiger as well.
Would it make sense to include this in the Firebird package, along with a similar script for earlier versions of MacOSX (pre 10.4 for the powerpc builds)

#!/bin/sh
echo "Clean Services"
echo "Clean User"
dscl localhost -delete /Local/Default/Users/firebird
echo "Clean Group"
dscl localhost -delete /Local/Default/Groups/firebird
if [ -f "/Library/StartupItems/Firebird" ]; then
echo "Remove SuperServer StartupItem"
rm -fr /Library/StartupItems/Firebird
fi
if [ -f "/Library/LaunchDaemons/org.firebird.gds.plist" ]; then
echo "Remove Launchd"
launchctl unload /Library/LaunchDaemons/org.firebird.gds.plist
rm /Library/LaunchDaemons/org.firebird.gds.plist
fi
echo "Remove Framework"
rm -fr /Library/Frameworks/Firebird.framework
echo "Remove Receipt"
rm -fr /Library/Receipts/Firebird*.pkg

#Add the following for Firebird V2.5
echo "Remove /tmp/firebird"
rm -fr /tmp/firebird

11 comments:

Nemanja said...

Thank you for this script. I just spent an hour trying to figure out how to uninstall 2.1 so I can downgrade to 1.5.

So obviously I think that this should definitely be included in the Firebird package.

Thanks!

Oliver said...

thank you. Same for me. I need Version 1.5 for an existing database which i cannot migrate right now.

metalox said...

Thank you so much for a very useful script. It seemed to work fine for me on Leopard.

metalox said...

Thank you very much for sharing this useful script.

Fernando Medeiros said...

Thanks for the script.

My Blog

Marc Augier said...

Merci beaucoup!

Alexander Orlov said...

thx! hope it deletes the complete installation of FB2.5@Mac10.6.6

Akira said...

Thank you so much for a very useful script!
I found it!

John Scuderi said...

Paul. I've trying to remove Firebird 2.5.2 The Firebird removal script is not working for me. I'm very new to the Terminal. I did add sudo before the script.

The terminal spits back "Permission denied" after every command.

Can you recommend a Terminal guide, or let me know what I might be doing wrong. Thanks.

Paul Beach said...

John,

I personally always run it like this.
su (and login as root)
cd to where the script is located
./runthescript.sh

John Scuderi said...

Thank you Paul. I'll try this.