0

I am installing caffe and I think I screwed up my install by having multiple versions of OpenCV. Now I don't know what I did on my own but I might have done something wrong and nothing is working. So my safest bet is to do a complete uninstall of OpenCV.

I would then like to install OpenCV after that using conda. I followed this thread to completely uninstall opencv from ubuntu. How to uninstall OpenCV 2.4.9 completely from Ubuntu?

but when I type:

sudo find / -name "*opencv*" -exec rm -i {} \;

Ubuntu still keeps asking me for permission to remove every file.
How do I tell Ubuntu to remove it all without permission because there are a lot of files?

permission:

enter image description here

Amm
  • 3
  • 3
  • Please post text files and program output listings as text, not as images (see [How do I save terminal output to a file?](//askubuntu.com/q/420981/175814)). – David Foerster Jul 06 '16 at 08:56

2 Answers2

2

Quick solution

Remove the -i flag from the rm command invoked from find -exec.

Elegant solution

Don't use -exec rm at all but the -delete action of find instead.

Advice for both cases…

You should probably run find without a destructive action like -exec rm or -delete first to verify that it won't delete precious files.

What you really want…

is to uninstall a botched OpenCV installation. The deinstallation procedure depends on how it was installed in the first place. Please open a new question for that and line out how OpenCV was installed.

David Foerster
  • 35,754
  • 55
  • 92
  • 145
  • Thanks ! It worked ! Should have taken the elegant solution. I used the quick solution and I think I worsened my already ruined installation of caffe. Had to reinstall anaconda because I think I might have deleted some important files there.. wasn't able to install opencv via conda...Ah well, im a novice in ubuntu. Im bound to make even more mistakes. But thanks ! – Amm Jul 06 '16 at 11:07
0

Remove the -i flag in your command. Please make sure you want to remove all files whose names contain opencv before running the command.

edwinksl
  • 23,569
  • 16
  • 74
  • 100