Skip navigation

Want to bulk delete .svn folders recursively?

Warning: Before you use this command make sure you have changed to the correct directory where you want to apply this. example:

cd /mysvn/path/iwant/to/delete/svn/folders

find -name "\.svn" -exec rm -rf {} \;



  1. LOL, this is the same thing I do. I also like removing the ~backup files eg index.php~

  2. This is what I was looking for, great. Thanks!!!

  3. Thanks a ton! After looking at plenty of inimitably fail forum threads this succinct post has solved my n00b problem 🙂 Thanks again!

  4. probably good to mention that you should first cd (change directory) to the folder you want to recursively search in because find will start finding from your working directory.

    also i tried this in ubuntu 8.10 intrepid and i didn’t get any results until i rewrote it to this:
    find -name .svn -exec rm -fdr {} \;

    thanks for getting me on the right path at least. keep keeping it real bro =)

    is that you paddling over that big wave? that guy has balls. “i like balls.” (team america, world police)

  5. Exactly what I was looking for, thanks!

  6. Depending your particular reason for doing this you may want to consider svn export…

    cd /mysvn/path/iwant/to/delete/svn/folders
    svn export ./ /path/for/clean/directory/structure

    “svn export” exports a clean copy of your version-controlled directory to a target directory without messing with the original.

  7. Thanks a ton. This thing was driving me crazy!!

  8. Thanks a bunch!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: