[HELP]how to unset an environment variable such as PATH?

X11R6 has a progam “mkfontdir” which is same named after photon,
if PATH is set as PATH=/usr/photon/bin:/usr/X11R6:$PATH, some problems occur. How to unset /usr/photon/bin or /usr/X11R6/bin without changing other variables?
Thanks a lot for help!

in /etc/profile is the default PATH set (default profile file)
Just remove it there. Another option is, call on mkfontdirX11 the other mkfontdirPhoton and create a symlink for the file you need :stuck_out_tongue_winking_eye:
More special would be, check the parameters given to fontdir (if they differ) and decide depending on the parameters which programm to call :stuck_out_tongue_winking_eye:

Would be something like:

If any parameter given is element of [bdfims] → call mkdirPhoton
If any parameter given is element of [enprx] → call mkdirX11

But i wonder why other people did not match the same problem ^^

Edit says the docu know of:

If you are using mkfontdir under Linux or Solaris, you should make sure that your LD_LIBRARY_PATH environment variable includes the correct library paths. As well, because these operating systems have with their own version of mkfontdir, you need to start the utility with the full path to start the QNX version.

I had some fun, something like this (no guarantee ^^)

#!/bin/sh

MKFONTDIRPH=/usr/photon/bin/mkfontdirph
MKFONTDIRX11=/usr/X11R6/bin/mkfontdirx11

PHOTONPARA="-b -d -f -i -m -s";
X11PARA="-e -n -p -r -x";

for i in $@; do
	for k in $PHOTONPARA; do
		if [ "$i" = "$k" ]; then
			exec $MKFONTDIRPH $@;
			exit 0;
		fi;
	done;
	for j in $X11PARA; do
		if [ "$i" = "$j" ]; then
			exec $MKFONTDIRX11 $@;
			exit 0;
		fi;
	done;
done;

Thanks a lot ! Some scripts have to be changed in ‘ph’ to determine the PATH environment may work?