How to remove directory from $PATH


Please shareShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditDigg thisShare on StumbleUponShare on VKBuffer this page

Question :How to remove directory from $PATH

Answer : We suppose that you added a directory /usr/zinovsky by mistike to your $PATCH

export PATH=$PATH:/usr/zinovsky

To remove this directry from the patch :

export PATH=`echo $PATH | sed -e ‘s/:/usr/zinovsky$//’`

You can always change /usr/zinovsky$//’` to match your directory.


Is all , please report any problem. Thank you