Forum Documentation

How do I remove old Prince 12 path from MacOSX Mojave environment variable?

I recently updated my prince from 12.4 to 13.5

In installing 13.5, I followed the installation guide in

13.5 is now installed in /usr/local/lib/prince/bin/prince and working.

I need to remove my previous prince installation path which is different from the new installed path.

How do I do it?
If you have a script that sets the PATH then you will need to edit that script, but if you just set it manually from the terminal then you can set it again to the new value. For example if "echo $PATH" shows something like "/Users/me/bin:/something/else:/old/path/to/prince" you could do this:
export PATH="/Users/me/bin:/something/else:/usr/local/bin/prince"

To set the path for Prince 13 I entered this using terminal
export PATH=/usr/local/lib/prince/bin/prince:$PATH

The folder for Prince 12 is still existing on my computer but I renamed it. When I rename it back to the original/working folder name, and type prince --version in the terminal gives me Prince 12.4

I Renamed the working the prince 12 folder and restarted terminal, now prince --version gives me Prince 13.5

Does this mean that the path for prince 12 still exists even If I already set the path for prince 13 with export PATH=/usr/local/lib/prince/bin/prince:$PATH?

I entered echo $PATH command in terminal and I see this:

It shows the Prince 12 path but not the new prince 13 path.

What do I make of this?
The command:
export PATH=x:$PATH

Will add "x" at the front of the existing PATH value. The PATH value is just a list of folder names separated by colons that will be checked in turn when you run a command. The folders may or may not actually exist, you can check them by exploring in the Finder or using the cd and ls commands in the Terminal.
Thanks for the reply.

So if I enter export PATH=/usr/local/lib/prince/bin/prince:$PATH it should show:


with '/usr/local/lib/prince/bin/prince:' at the front right? but this path is not showing when I enter echo $PATH

however prince 13 works wherever folder I am in. so it means that path has been added to the path environment variable somewhere

Going back to my first question: Is there a way I can remove /usr/local/lib/prince/bin/prince:/Users/Username/Documents/prince/bin: from PATH and retain the other paths that are currently there?
I will try your solution in your reply. Thanks!