I installed OpenCV this way
#After downloading OpenCV-3.0, in the directory: echo \"#define GTEST_USE_OWN_TR1_TUPLE 1\" | cat > temp1 cat modules/ts/incl
Go to the build directory and run sudo make uninstall
sudo make uninstall
Delete that line you added to ~/.bashrc
Remove the opencv directory
If you used Homebrew to install you can use this command.
brew uninstall opencv3
You will not have to remove any directory such as /usr/local/Cellar/opencv3
/usr/local/Cellar/opencv3