-1

I just removed the miniconda3's folder from home/username/, now i want to remove its path from my $PATH variable permanently.

As you can see below, it's the first one:

/home/username/miniconda3/bin:/home/username/miniconda3/condabin:/home/username/.nvm/versions/node/v16.17.1/bin:/home/username/.sdkman/candidates/maven/current/bin

How can i remove it from my PATH variable?

1
  • 1
    Find where it was set, check your ~/.bashrc, ~/.bash_profile and so on.
    – mestia
    Commented Sep 28, 2022 at 17:01

2 Answers 2

0

This is quite easy, as commented by mestia above. You need to find where the addition happens, probably in one of your files ~/.bashrc or ~/.bash_profile, and remove the addition!

-1

Try this, it worked for me. Only have to change the path.

PATH=$(REMOVE_PART="--PATH TO REMOVE--" sh -c 'echo ":$PATH:" | sed "s@:$REMOVE_PART:@:@g;s@^:\(.*\):\$@\1@"')

https://unix.stackexchange.com/a/178822/543146

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .