#step 1: create a list of the svn content with svn -R list > filelist #step 2 extract the file names aout of that list, supress directories echo $1 grep -v "/$" $1 > temp_filelist.txt if [[ -s temp_filelist.txt ]] ; then echo "start the work..." # delete all files while read file; do echo "$file" ; rm "$file"; done < temp_filelist.txt # delete all old .svn folders # first rescue the root .svn directory mv .svn svn-root find . -name ".svn" -exec rm -rf {} \; # delete these silly thumbs.db find . -name "Thumbs.db" -exec rm -rf {} \; # restore root svn mv svn-root .svn # finally remove all empty directories find . -empty -type d -delete else echo "no valid input file found" fi ;