Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't remove an item in $PATH (Xamarin Workbooks)

Tags:

bash

macos

The following directory no longer exists on my MacBook Pro after I uninstalled Visual Studio Community Edition for Mac. I can copy and paste it from the $PATH though here:

/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin 

It's still in the $PATH but I can't tell where it is being set

~ $ grep -n SharedSupport ${HOME}/.bash_profile
~ $ grep -n SharedSupport ${HOME}/.bashrc
~ $ grep -n SharedSupport ${HOME}/.profile
~ $ grep -n SharedSupport ${HOME}/.zshrc
~ $ grep -n SharedSupport ${HOME}/.zprofile
~ $ grep -n SharedSupport ${HOME}/.zlogin

Any ideas how to remove it from the $PATH? I uninstalled it so naturally the terminal can't find the folder. Now I can't find where it's being exported to PATH so I can remove it.

like image 588
sf2k Avatar asked Jan 28 '23 15:01

sf2k


1 Answers

Just figured it out! Turns out it stores its paths in a file in /etc/paths.d called Xamarian, like Jonathan Leffler commented. So in order to delete it, we'll need to:

  • Open a terminal, this can be iTerm, Terminal, etc.

  • CD Into the Directory cd /etc/paths.d

  • Remove the file called xamarian with rm, rm -rf xamarian

That's it!

like image 124
AtomicCoding Avatar answered Jan 31 '23 14:01

AtomicCoding