I tried to remove OpenCV 4.2 but failed.
I built it from the source,
First of all, used $ opencv/build/ sudo make uninstall
I always use this method but today failed. it gave an error because I did not use sudo ldconfig
after sudo make install
when it built, I guess. Anyway, I removed file build then OpenCV and used many commands, from them:
sudo apt remove libopencv*
sudo find / -name "*opencv*" -exec rm -i {} \;
yes | sudo find / -name "*opencv*" -exec rm -i {} \;
and
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
and replace every 2.4 by 4.2, it gave me "no library"
and
sudo rm -r /usr/local/include/opencv4 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv4 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*
something is strange, please help me.