Uninstall Ghostscript installed from source

...don't fret because this is only a test volume but:


I installed Ghostscript via MacPorts on Sonoma and it worked OK when opening .eps with GraphicConverter. I could install it and uninstall it via:


sudo port install ghostscript


which gs
/opt/local/bin/gs


sudo port uninstall ghostscript


I then installed Ghostscript from source via ./configure, make, sudo make install. That does not work with GraphicConverter .eps.


which gs
/usr/local/bin/gs


-> Question: how can I cleanly uninstall that /usr/local/bin/gs and its related files?


I tried sudo make uninstall, clean gs etc but that did not work.


Yes, I could just remove the installed binaries I think are related to gc but that does not seem kosher.

Posted on May 2, 2024 11:23 AM

Reply
Question marked as Top-ranking reply

Posted on May 2, 2024 1:04 PM

Matti Haveri wrote:

I tried sudo make uninstall, clean gs etc but that did not work.

Yes, I could just remove the installed binaries I think are related to gc but that does not seem kosher.

Why not? That's pretty much your only option.


You can always cheat. Configure it with a prefix like:


./configure --prefix=/tmp/local


Then build and install.


Then, go into your /tmp/local and do a magic "find" command like this:


find . -exec echo rm /usr/local/{} \; -print


If that looks good, run it again without the "echo".



6 replies
Question marked as Top-ranking reply

May 2, 2024 1:04 PM in response to Matti Haveri

Matti Haveri wrote:

I tried sudo make uninstall, clean gs etc but that did not work.

Yes, I could just remove the installed binaries I think are related to gc but that does not seem kosher.

Why not? That's pretty much your only option.


You can always cheat. Configure it with a prefix like:


./configure --prefix=/tmp/local


Then build and install.


Then, go into your /tmp/local and do a magic "find" command like this:


find . -exec echo rm /usr/local/{} \; -print


If that looks good, run it again without the "echo".



May 3, 2024 12:21 AM in response to etresoft

> Configure it with a prefix like: ./configure --prefix=/tmp/local


Thanks, that seemed to do the trick:


./configure --prefix=/tmp/local
make
sudo make install
cd /tmp/local
find . -exec echo rm /usr/local/{} \; -print
sudo find . -exec rm -f /usr/local/{} \; -print

which gs
gs not found

cd /usr/local/bin/gs
cd: no such file or directory: /usr/local/bin/gs

cd /tmp/local [after reboot]
cd: no such file or directory: /tmp/local


I presumed unix apps would have uninstall options. Maybe other binaries have?

May 2, 2024 1:17 PM in response to Matti Haveri

Your choice of package manager is your own, of course, but the current GraphicConverter 12 manual suggests using homebrew for this purpose for the installation of Ghostscript. Then you don't have to manually compile and install Ghostscript as homebrew will automatically do the build and install using the Command Line Tools for Xcode. Depending on your architecture, it will generate X86_64 or Apple Silicon binaries and libraries.


The above is the approach that I used.

May 3, 2024 4:59 AM in response to Matti Haveri

Matti Haveri wrote:

I presumed unix apps would have uninstall options. Maybe other binaries have?

There's no such thing as a "unix app". Some open source packages include uninstallers, some don't. Same goes for other apps. The only guaranteed, reliable uninstaller is the Apple one for Mac App Store apps. But then there is so much misinformation that even those aren't complete. Too many people think reinstalling an app is going to fix something so Apple can't risk deleting app data. It's a royal mess.


There are probably better options for whatever you are trying than GraphicConverter. Any app that tells you to install some other app is suspect.

May 3, 2024 5:08 AM in response to Matti Haveri

As a matter of course, and because I have MacTeX installed, I have been installing Ghostscript via homebrew for several years now and configuring MacTeX to use that (newer) version. Probably why I have not seen the GC dialog you provided above. Ghostscript also installs a slew of ps* utilities such as ps2pdf.


If I were not using MacTeX, there would be a diminishing reason to install Ghostscript and any EPS files do open nicely in Affinity Designer 2.4.2 providing a means to export to more sane PDF or PSD.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Uninstall Ghostscript installed from source

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.