How to uninstall OpenCV 2.4.9 completely from Ubuntu?

I want to integrate OpenCV with qt creator and for that OpenCV 3.0 is required.

I have OpenCV 2.4.9 already installed and want to uninstall it completely as it is causing problems in some functions. I would also like to know whether OpenCV 3.0 can be installed in 32-bit Ubuntu 14.04?


Solution 1:

I had a similar issue, but with version 2.4.8, I found this solution:

"So, to find all OpenCV libraries 1

$> 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! That will take a hell of long time. Next I figure out that since I installed from compiling opencv from the source and used

make install

to create the install manifest, and then I pretty simple to use

make uninstall

Yes indeed it for sure clean up itself. Now I have a clean system to install the lates opencv release."

Works for me.

Solution 2:

This may be an easier way to go:

sudo apt-get autoremove opencv-doc opencv-data libopencv-dev libopencv2.4-java libopencv2.4-jni python-opencv libopencv-core2.4 libopencv-gpu2.4 libopencv-ts2.4 libopencv-photo2.4 libopencv-contrib2.4 libopencv-imgproc2.4 libopencv-superres2.4 libopencv-stitching2.4 libopencv-ocl2.4 libopencv-legacy2.4 libopencv-ml2.4 libopencv-video2.4 libopencv-videostab2.4 libopencv-objdetect2.4 libopencv-calib3d2.4 

Solution 3:

Use the synaptic package manager to remove all opencv libraries from your machine.