Sign in Join
Wiki copytemporary

Uninstalling Lazarus on macOS: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Uninstalling Lazarus on macOS

OldNewLine
1+## Installed using fink
2+
3+If you installed Lazarus + FPC using `fink`, the complete uninstall of all Lazarus + FPC packages is done with:
4+
5+``` bash
6+fink purge --recursive fpc-config
7+```
8+
9+If you want to preserve changes to the preference file /sw/etc/fpc.cfg, do:
10+
11+``` bash
12+fink remove --recursive fpc-config
13+```
14+
15+For the removal of the Lazarus preferences subdirectory in your home directory, and the files that it contains, see the end of the next section.
16+
17+## Installed using the official packages
18+
19+Normally you uninstall an application on macOS simply by dragging it from the Applications folder to the trash. As Lazarus and Free Pascal are development tools, they install files in several folders that you don't normally see in Finder and so the normal approach does not work.
20+
21+You can usually install newer versions of Lazarus over older versions, while newer versions of Free Pascal are installed in unique directories. However, as with most software it's not a bad idea to clean out everything before you install a newer version. The two scripts below should give you a sense of where the various pieces of Lazarus and Free Pascal are located.
22+
23+You can copy and save the commands from one of the following scripts to a file, say `uninstallLaz.sh`, and run it if you need to uninstall Lazarus and Free Pascal.
24+
25+### FPC 3.x.x and Lazarus 2.0.8 through 2.0.10
26+
27+The script below will delete all versions of FPC and Lazarus which have been installed in the targeted locations using the official Lazarus installation packages (which also install FPC). These locations are correct for FPC 3.x.x and Lazarus 2.0.8 through 2.0.10.
28+
29+``` sh
30+#!/bin/sh
31+#
32+# Uninstaller script for FPC 3.x.x and Lazarus 2.0.8 to 2.0.10
33+#
34+bin=/usr/local/bin
35+private=/private/etc
36+share=/usr/local/share
37+lib=/usr/local/lib
38+library=/Library
39+receipts=/private/var/db/receipts
40+fpcdoc="/Users/Shared/Free Pascal Compiler"
41+manpages=/usr/local/share/man
42+app=/Applications
43+
44+rm -fv $bin/pas2js
45+rm -fv $bin/pas2jni
46+rm -fv $bin/pas2fpm
47+rm -fv $bin/mkx86ins
48+rm -fv $bin/mkinsadd
49+rm -fv $bin/mkarmins
50+rm -fv $bin/mka64ins
51+rm -fv $bin/makeskel.rsj
52+rm -fv $bin/makeskel
53+rm -fv $bin/json2pas
54+rm -fv $bin/instantfpc
55+rm -fv $bin/h2paspp
56+rm -fv $bin/h2pas
57+rm -fv $bin/fprcp
58+rm -fv $bin/fppkg
59+rm -fv $bin/fpdoc
60+rm -fv $bin/fpcsubst.rsj
61+rm -fv $bin/fpcsubst
62+rm -fv $bin/fpcreslipo
63+rm -fv $bin/fpcres
64+rm -fv $bin/fpcmkcfg.rsj
65+rm -fv $bin/fpcmkcfg
66+rm -fv $bin/fpcmake
67+rm -fv $bin/fpclasschart.rsj
68+rm -fv $bin/fpclasschart
69+rm -fv $bin/fpcjres
70+rm -fv $bin/fpc
71+rm -fv $bin/fd2pascal
72+rm -fv $bin/delp
73+rm -fv $bin/data2inc
74+rm -fv $bin/compileserver
75+rm -fv $bin/cldrparser
76+rm -fv $bin/chmls
77+rm -fv $bin/chmcmd
78+rm -fv $bin/bin2obj
79+rm -fv $bin/webidl2pas
80+rm -fv $bin/unitdiff.rsj
81+rm -fv $bin/unitdiff
82+rm -fv $bin/unihelper
83+rm -fv $bin/rstconv.rsj
84+rm -fv $bin/rstconv
85+rm -fv $bin/rmcvsdir
86+rm -fv $bin/pyacc
87+rm -fv $bin/ptop.rsj
88+rm -fv $bin/ptop
89+rm -fv $bin/ppumove
90+rm -fv $bin/ppufiles
91+rm -fv $bin/ppudump
92+rm -fv $bin/ppdep
93+rm -fv $bin/postw32
94+rm -fv $bin/plex
95+rm -fv $bin/pas2ut.rsj
96+rm -fv $bin/pas2ut
97+rm -fv $bin/ppcx64
98+rm -fv $bin/ppc386
99+rm -fv $bin/lazbuild
100+
101+rm -rfv $private/lazarus
102+
103+rm -rfv $share/fpcsrc
104+rm -rfv $share/src/fpc-*
105+rm -rfv $share/doc/fpc-*
106+
107+rm -rfv $lib/fpc
108+
109+rm -rfv $library/Lazarus
110+
111+rm -rfv $receipts/org.lazarus*
112+rm -rfv $receipts/org.freepascal*
113+
114+rm -rfv "$fpcdoc"
115+
116+rm -fv $manpages/man1/bin2obj.1.gz
117+rm -fv $manpages/man1/chmcmd.1.gz
118+rm -fv $manpages/man1/chmls.1.gz
119+rm -fv $manpages/man1/data2inc.1.gz
120+rm -fv $manpages/man1/delp.1.gz
121+rm -fv $manpages/man1/fd2pascal.1.gz
122+rm -fv $manpages/man1/fpc.1.gz
123+rm -fv $manpages/man1/fpcjres.1.gz
124+rm -fv $manpages/man1/fpclasschart.1.gz
125+rm -fv $manpages/man1/fpcmake.1.gz
126+rm -fv $manpages/man1/fpcmkcfg.1.gz
127+rm -fv $manpages/man1/fpcres.1.gz
128+rm -fv $manpages/man1/fpcsubst.1.gz
129+rm -fv $manpages/man1/fpdoc.1.gz
130+rm -fv $manpages/man1/fppkg.1.gz
131+rm -fv $manpages/man1/fprcp.1.gz
132+rm -fv $manpages/man1/grab_vcsa.1.gz
133+rm -fv $manpages/man1/h2pas.1.gz
134+rm -fv $manpages/man1/h2paspp.1.gz
135+rm -fv $manpages/man1/makeskel.1.gz
136+rm -fv $manpages/man1/pas2fpm.1.gz
137+rm -fv $manpages/man1/pas2jni.1.gz
138+rm -fv $manpages/man1/pas2ut.1.gz
139+rm -fv $manpages/man1/plex.1.gz
140+rm -fv $manpages/man1/postw32.1.gz
141+rm -fv $manpages/man1/ppc386.1.gz
142+rm -fv $manpages/man1/ppcarm.1.gz
143+rm -fv $manpages/man1/ppcppc.1.gz
144+rm -fv $manpages/man1/ppcsparc.1.gz
145+rm -fv $manpages/man1/ppcx64.1.gz
146+rm -fv $manpages/man1/ppdep.1.gz
147+rm -fv $manpages/man1/ppudump.1.gz
148+rm -fv $manpages/man1/ppufiles.1.gz
149+rm -fv $manpages/man1/ppumove.1.gz
150+rm -fv $manpages/man1/ptop.1.gz
151+rm -fv $manpages/man1/pyacc.1.gz
152+rm -fv $manpages/man1/rmcvsdir.1.gz
153+rm -fv $manpages/man1/rstconv.1.gz
154+rm -fv $manpages/man1/unitdiff.1.gz
155+rm -fv $manpages/man5/fpc.cfg.5.gz
156+rm -fv $manpages/man5/fpcmake.5.gz
157+rm -fv $manpages/man5/ptop.cfg.5.gz
158+
159+rm -fv /Applications/Lazarus.app
160+
161+rm -fv /etc/fpc.cfg
162+rm -fv ~/.fpc.cfg
163+rm -rfv ~/.fppkg
164+```
165+
166+### FPC 3.x.x and Lazarus 2.0.11+ and 2.2.0
167+
168+The script below will delete all versions of FPC and Lazarus which have been installed in the targeted locations using the official Lazarus installation packages (which also install FPC). These locations are correct for FPC 3.x.x and Lazarus 2.0.11, 2.0.12 and 2.2.0.
169+
170+``` sh
171+#!/bin/sh
172+# Uninstaller for FPC 3.2.x and Lazarus 2.0.11, 2.0.12 and 2.2.0
173+#
174+bin=/usr/local/bin
175+share=/usr/local/share
176+lib=/usr/local/lib
177+receipts=/private/var/db/receipts
178+private=/private/etc
179+fpcdoc="/Users/Shared/Free Pascal Compiler"
180+manpages=/usr/local/share/man
181+
182+rm -fv $bin/ptop.rsj
183+rm -fv $bin/unitdiff.rsj
184+rm -fv $bin/fpclasschart.rsj
185+rm -fv $bin/makeskel.rsj
186+rm -fv $bin/fpcsubst.rsj
187+rm -fv $bin/rstconv.rsj
188+rm -fv $bin/fpcmkcfg.rsj
189+rm -fv $bin/pas2ut.rsj
190+rm -fv $bin/fd2pascal
191+rm -fv $bin/h2paspp
192+rm -fv $bin/postw32
193+rm -fv $bin/mkarmins
194+rm -fv $bin/mka64ins
195+rm -fv $bin/data2inc
196+rm -fv $bin/msg2inc
197+rm -fv $bin/mkx86ins
198+rm -fv $bin/ppdep
199+rm -fv $bin/mkinsadd
200+rm -fv $bin/chmls
201+rm -fv $bin/rmcvsdir
202+rm -fv $bin/fpc
203+rm -fv $bin/mkz80ins
204+rm -fv $bin/delp
205+rm -fv $bin/h2paschk
206+rm -fv $bin/plex
207+rm -fv $bin/pyacc
208+rm -fv $bin/eawparser
209+rm -fv $bin/gbpparser
210+rm -fv $bin/ppufiles
211+rm -fv $bin/ppumove
212+rm -fv $bin/chmcmd
213+rm -fv $bin/fpcsubst
214+rm -fv $bin/mkx86inl
215+rm -fv $bin/fprcp
216+rm -fv $bin/wasmtool
217+rm -fv $bin/instantfpc
218+rm -fv $bin/bin2obj
219+rm -fv $bin/h2pas
220+rm -fv $bin/wasa
221+rm -fv $bin/fpcreslipo
222+rm -fv $bin/fpcmake
223+rm -fv $bin/unihelper
224+rm -fv $bin/rstconv
225+rm -fv $bin/fpcjres
226+rm -fv $bin/pas2jni
227+rm -fv $bin/fpcres
228+rm -fv $bin/fpcmkcfg
229+rm -fv $bin/ppudump
230+rm -fv $bin/unitdiff
231+rm -fv $bin/makeskel
232+rm -fv $bin/cldrparser
233+rm -fv $bin/ihxutil
234+rm -fv $bin/ptop
235+rm -fv $bin/fpclasschart
236+rm -fv $bin/webidl2pas
237+rm -fv $bin/json2pas
238+rm -fv $bin/pas2fpm
239+rm -fv $bin/pas2ut
240+rm -fv $bin/fppkg
241+rm -fv $bin/pas2js
242+rm -fv $bin/compileserver
243+rm -fv $bin/fpdoc
244+rm -fv $bin/ppca64
245+rm -fv $bin/ppcx64
246+rm -fv $bin/ppc386
247+
248+rm -rfv $private/lazarus
249+rm -rfv /Applications/Lazarus
250+rm -rfv $share/fpcsrc
251+rm -rfv $share/src/fpc-*
252+rm -rfv $share/doc/fpc-*
253+rm -rfv $lib/fpc
254+
255+rm -rfv $receipts/org.lazarus*
256+rm -rfv $receipts/org.freepascal*
257+
258+rm -rfv "$fpcdoc"
259+
260+rm -fv $manpages/man1/bin2obj.1.gz
261+rm -fv $manpages/man1/chmcmd.1.gz
262+rm -fv $manpages/man1/chmls.1.gz
263+rm -fv $manpages/man1/data2inc.1.gz
264+rm -fv $manpages/man1/delp.1.gz
265+rm -fv $manpages/man1/fd2pascal.1.gz
266+rm -fv $manpages/man1/fpc.1.gz
267+rm -fv $manpages/man1/fpcjres.1.gz
268+rm -fv $manpages/man1/fpclasschart.1.gz
269+rm -fv $manpages/man1/fpcmake.1.gz
270+rm -fv $manpages/man1/fpcmkcfg.1.gz
271+rm -fv $manpages/man1/fpcres.1.gz
272+rm -fv $manpages/man1/fpcsubst.1.gz
273+rm -fv $manpages/man1/fpdoc.1.gz
274+rm -fv $manpages/man1/fppkg.1.gz
275+rm -fv $manpages/man1/fprcp.1.gz
276+rm -fv $manpages/man1/grab_vcsa.1.gz
277+rm -fv $manpages/man1/h2pas.1.gz
278+rm -fv $manpages/man1/h2paspp.1.gz
279+rm -fv $manpages/man1/makeskel.1.gz
280+rm -fv $manpages/man1/pas2fpm.1.gz
281+rm -fv $manpages/man1/pas2jni.1.gz
282+rm -fv $manpages/man1/pas2ut.1.gz
283+rm -fv $manpages/man1/plex.1.gz
284+rm -fv $manpages/man1/postw32.1.gz
285+rm -fv $manpages/man1/ppc386.1.gz
286+rm -fv $manpages/man1/ppcarm.1.gz
287+rm -fv $manpages/man1/ppcppc.1.gz
288+rm -fv $manpages/man1/ppcsparc.1.gz
289+rm -fv $manpages/man1/ppcx64.1.gz
290+rm -fv $manpages/man1/ppdep.1.gz
291+rm -fv $manpages/man1/ppudump.1.gz
292+rm -fv $manpages/man1/ppufiles.1.gz
293+rm -fv $manpages/man1/ppumove.1.gz
294+rm -fv $manpages/man1/ptop.1.gz
295+rm -fv $manpages/man1/pyacc.1.gz
296+rm -fv $manpages/man1/rmcvsdir.1.gz
297+rm -fv $manpages/man1/rstconv.1.gz
298+rm -fv $manpages/man1/unitdiff.1.gz
299+rm -fv $manpages/man5/fpc.cfg.5.gz
300+rm -fv $manpages/man5/fpcmake.5.gz
301+rm -fv $manpages/man5/ptop.cfg.5.gz
302+
303+rm -fv /etc/fpc.cfg
304+rm -fv ~/.fpc.cfg
305+rm -rfv ~/.fppkg
306+```
307+
308+To run either of the above scripts, open an Applications \> Utilities \> Terminal, and enter:
309+
310+``` bash
311+cd <replace this text and angle brackets with the name of the directory where the script is stored>
312+chmod +x uninstallLaz.sh
313+sudo ./uninstallLaz.sh
314+```
315+
316+Then enter your password when prompted.
317+
318+### Lazarus preference folder .lazarus in the home directory
319+
320+Lazarus also creates a .lazarus preferences subdirectory in your home directory where it stores environment settings and a list of recently opened projects and files. You can leave this folder alone if you want the new version of Lazarus you're installing to use your old settings. macOS normally doesn't show files or folders whose names start with a dot (.). To see this folder and its contents, open an Applications \> Utilities \> Terminal and enter the following in the Terminal window:
321+
322+``` bash
323+cd .lazarus
324+ls -al
325+```
326+
327+To remove it, execute the following commands in a Terminal:
328+
329+``` bash
330+cd
331+rm -rfv .lazarus
332+```
333+
334+### Third party package uninstaller
335+
336+If you have installed Lazarus using the official package files, then you can also use a third party uninstaller like [UninstallPKG](https://www.corecode.io/uninstallpkg/) from Core Code. You can perform 5 uninstallations for free before you need to buy it (\$US 9.99/Euro 9.99).
337+
338+---
339+*From the Free Pascal wiki, page "Uninstalling Lazarus on macOS", as it stood on 2021-11-04 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history