LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Remove files found with "locate" (https://www.linuxquestions.org/questions/linux-software-2/remove-files-found-with-locate-504238/)

JRR883 11-23-2006 09:35 AM

Remove files found with "locate"
 
I installed something that apparently doesn't have an uninstall script with it, so I'm going to have to remove all the files it installed. Using a bash command, how do I delete all the files found with locate? There are 2414 files, so I really don't want to type them all out.

rednuht 11-23-2006 10:35 AM

try
locate KEY | rm
or
locate KEY | xargs rm
where KEY is the name you are looking for, but double check only the files you want are listed !

JRR883 11-23-2006 11:44 AM

locate key | xargs rm worked. In my case, it was "locate mythtv | sudo xargs rm -rf" for anyone who might have the same issue. Thanks rednuht.

David the H. 11-23-2006 12:17 PM

I'm assuming you compiled this program from source. In the future I suggest you use checkinstall. It's a useful program that catalogs the installation files and wraps them up in a package of your choice (.deb,rpm,.tgz), so that you can control it with your package manager. That way you won't have to hunt around for all the various files individually.


All times are GMT -5. The time now is 12:32 AM.