[fpc-devel] Uninstalling fpc in MacOS X

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Aug 23 00:14:44 CEST 2007


On 22 Aug 2007, at 23:36, Christian U. wrote:

> Is there an easy way to uninstall fpc in MacOS X ?

Not really. An uninstall facility is a glaring omission in Apple's  
Mac OS X installer infrastructure (even though you can mark installer  
packages as "uninstallable" when creating them, there is no uninstall  
command to be found anywhere).

> I have installes an snapshot package from lazarus page with fpc 2.1.5.

Type cmd-shift-G in the Finder, enter /usr/local/lib in the dialog  
box, and delete the "fpc" folder from the directory you end up in  
(you will have to authenticate as administrator to be able to do  
that). That will remove the bulk of the files. If you want, you can  
also delete these files (note that /usr/local/bin can also contain  
other files, so it's generally not safe to just delete that entire  
directory):

/usr/local/bin/bin2obj
/usr/local/bin/data2inc
/usr/local/bin/delp
/usr/local/bin/fd2pascal
/usr/local/bin/fpc
/usr/local/bin/fpcmake
/usr/local/bin/fpcmkcfg
/usr/local/bin/fpcsubst
/usr/local/bin/fpdoc
/usr/local/bin/fppkg
/usr/local/bin/fprcp
/usr/local/bin/h2pas
/usr/local/bin/h2paspp
/usr/local/bin/makeskel
/usr/local/bin/mkxmlrpc
/usr/local/bin/plex
/usr/local/bin/postw32
/usr/local/bin/ppcppc
/usr/local/bin/ppdep
/usr/local/bin/ppudump
/usr/local/bin/ppufiles
/usr/local/bin/ppumove
/usr/local/bin/ptop
/usr/local/bin/pyacc
/usr/local/bin/rmcvsdir
/usr/local/bin/rstconv
/usr/local/bin/unitdiff

Next, you can navigate to /Library/Receipts in the Finder and delete  
the fpc-2.1.5*.pkg file (replace * with the date of the snapshot your  
downloaded).


It's also possible to automate entire process, but BE WARNED: I did  
*NOT* test the following, and an error in a command like that can  
result in many more files being deleted than just those you want to  
be gone. Proceed at your own risk.

Executing the following in a Terminal window should do the trick  
(type the commands followed by "return"):

1) cd /

2) (make sure the entire following command is on one line; you will  
also be asked for your administrator password):
sudo lsbom -pF /Library/Receipts/fpc-2.1.5*.pkg/Contents/Archive.bom  
| xargs rm -f

Next, you can navigate to /Library/Receipts in the Finder and delete  
the fpc-2.1.5*.pkg file (replace * with the date of the snapshot your  
downloaded) -- same as in the first set of instructions.

This second set of commands will leave behind a few empty  
directories, but all FPC-related files will be removed.


Jonas



More information about the fpc-devel mailing list