Removing all installed OpenCV libs

前端 未结 8 807
花落未央
花落未央 2020-12-01 03:07

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..

<
相关标签:
8条回答
  • 2020-12-01 03:33
    sudo rm /home/god/softwares/miniconda3/{bin,lib}/*opencv* 
    
    0 讨论(0)
  • 2020-12-01 03:37

    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

    0 讨论(0)
  • 2020-12-01 03:39

    for a specific version for example 3.2:

    sudo find / -name "*opencv*3.2*"   -exec rm -rf {} \;
    
    0 讨论(0)
  • 2020-12-01 03:41

    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.

    0 讨论(0)
  • 2020-12-01 03:42

    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! :)

    0 讨论(0)
  • 2020-12-01 03:43

    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*";

    0 讨论(0)
提交回复
热议问题