You could use the extremely powerful find command.
I would use something like this:
find . -iname *cache* -ok rm -rf {} \;
Now let me explain it for you. Find is the name of the application, it has a lot of options but for you, you won't need many of them.
The .
means look in this current directory. This means you'll have to be in the right directory to start off with. I assume for you that is ~
-iname
means search my case insensitive name.
*cache*
means that the name must contain cache.
Now the next part is important.
-ok
means perform the commands that follow but as me if I want to do it first. This can be replaced with -exec
but I wouldn't advise it. That would delete things without telling you and you don't want that.
Ok, so the next line (which is the stuff that -ok
runs) is rm -rf {} \;
The rm -rf
I hope is self explanatory. The {}
is basically a placeholder for the name of the file it has found. The \;
at the end just means it is the end of that line.
I hope that makes sense.
I advise running the find command without everything right of and including -ok
. It will pump out a list of all the cache files first and you can review them. Then add the -ok
section and get cracking!