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.

Tags: , , , , , , , ,


Posted at June 24th, 2008 by chua

If you think this article helps you to solve your problem and clear your headache, feel free to buy me a drink :)


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

  1. SoN9ne Says:

    This did no work for me on OSx.

  2. 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.

  3. Eranga J Says:

    I prefer this:

    rm -rf `find -iname .svn`

  4. 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

Leave a Reply