How to delete all .svn folder in Linux / Mac?

advertisement

Few days ago, i’m looking for way to delete all the .svn folder. Today i found the way to delete all .svn folder from my project folder in Linux.

To delete all .svn folder in Linux just follow the steps below:-

  • Start Terminal
  • change your current directory to your project folder (ex: /Users/me/Sites/project_a)
  • type
    find ./ -name ".svn" | xargs rm -Rf
    and enter.
  • Done, all your .svn folder has been deleted.

By the way, you also can apply this method to remove all .svn folder in Mac machine.



Related Post


5 Responses to “How to delete all .svn folder in Linux / Mac?”

  1. Anil S says:

    Thanks for the post. It helped me alot.

  2. Merwok says:

    Why -iname? These directories are always lower-case. Moreover, specifying “-type d” will ensure find returns only directories, not regular files. We could also make sure directories with spaces won’t cause the command to break. So:

    find -type d -name .svn -print0 | xargs -0 rm -rf

  3. Eranga J says:

    I prefer this:

    rm -rf `find -iname .svn`

  4. Palaniraja says:

    Thanks. It works for me in linux. ubuntu 8.04 but nautils-svn cache still show the svn icon overlay but there was no .svn folders.

    Thanks again.

  5. SoN9ne says:

    This did no work for me on OSx.

Leave a Reply