I\'m running Kubuntu 11.10 (w/ KDE 4.8)
Before you read all this :
I just want to remove all traces of OpenCV from my system, so I can start afresh..
<sudo rm /home/god/softwares/miniconda3/{bin,lib}/*opencv*
If you have the build directory then it is recommended to execute:
$ sudo make uninstall
from the build directory as per @Navid 's answer
But this will leave few .so* files somewhere
To completely remove all such files, do:
$ sudo rm /usr/local/{bin,lib}/*opencv*
/usr/local
is what we normally set CMAKE_INSTALL_PREFIX
to while running cmake
. Replace it according to how you executed cmake
for a specific version for example 3.2:
sudo find / -name "*opencv*3.2*" -exec rm -rf {} \;
In order to remove all the files and folders without "interaction", use the below command :
sudo find / -name "*opencv*" -exec rm -rf {} \;
CAUTION: It's not advisable to run "recursive" and "force" deletion.
By default, when building OpenCV from source, it will place it's output in /usr/local/lib
and /usr/local/bin
. Although, judging from your error messages, it looks like it placed the libraries in /usr/lib
and the binaries in /usr/bin
, so you might also check in there.
You can also use the Linux find command. So, to find all OpenCV libraries you can do the following (this might take a while):
$> sudo find / -name "*opencv*" -exec rm -i {} \;
The above command will find any file containing opencv in the name, and will prompt you to remove it. As always, be careful when deleting things manually!
Another option might be to manually compile OpenCV again (exactly as you did before), make install
to create the install manifest, and then try make uninstall
to see if it will clean up itself.
Hope that helps! :)
I couldn't find the build directory so did:
sudo apt-get purge '*opencv*'
And:
sudo find / -name "*opencv*" -exec rm -rf {} \;
Which seems to have worked fine.
You can double check with:
sudo find / -name "*opencv*";