Removing Environment Variables On Mac

  • Sonar Systems admin
    Likes 0

    Problem Description

    Sometimes when settings up new frameworks and tools you may setup environment variables incorrectly, I know it has happened to me :(

     

    But removing then can be a pain if it is your first time.

    Solution Description

    cd /Users/sonarsystems (or wherever your user is)
    touch .bash_profile
    open .bash_profile

    In the file that opens add the following command
    unset VARIABLE_NAME

    save the file

    then run the following command
    source /Users/sonarsystems/.bash_profile (or wherever your user is)

  • mihir77
    Likes 0

    I am able to open the bash profile added unset NDK_ROOT and saved,

     

    When i type – source /Users/mihir/.bash_profile

    it gives me this error – 

    -bash: Source: command not found

    Can you help me here?

  • Sonar Systems admin
    Likes 0

    Can you show me a screenshot of the terminal.

Login to reply