Skip to content


How to cleanup a folder of SVN entries in Linux

Today I installed at work a Subversion ( SVN ) server and started to do repositories for our projects. At one project I got an error while committing files and then the cleanup operation errored out :( . The quick fix for this is usually to delete all “.svn” folders from the current folder. But what do you do if you have a project with thousands of folders in it? Stay all day? :)
No! The solution is pretty simple , just go with the shell in the problematic folder and write this command line :

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

which will delete recursively all folders called “.svn” from the current folder

I hope you’ll find this useful :)

Posted in Linux Tips & Tricks.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Sorin says

    For Windows XP/Vista/other flavours you can create a .bat file , put this command in it :

    FOR /F “tokens=*” %%G IN (‘DIR /B /AD /S *.svn*’) DO RMDIR /S /Q %%G

    and run it in the folder you want the .svn folders removed.

    Hope this helps :)



Some HTML is OK

or, reply to this post via trackback.


Get Adobe Flash playerPlugin by wpburn.com wordpress themes