Recursively Remove SVN files

The easier method would be to export the revision you want instead of checking it out. Try svn help export at the bash shell.

If you really want to use find to go through and remove all child directories called .svn you would do this:

find /path/to/search -type d -iname .svn -print0 | xargs -0 rm

EDIT

  • -type d #look for directories only
  • -iname .svn #case insensitive matching, probably not necessary
  • -print0 #prints the full file name followed by a null character instead of newlines. it allows file names with spaces or other whitespace to be passed properly to xargs -0

shopt -s globstar
rm -r **/.svn

Most versions of find have a delete action:

$ find /path/in/question -type d -name .svn -delete

Make sure you run it without the delete and look over the results first!