devoured elysium
devoured elysium

Reputation: 105227

Deleting all the contents of a SVN repository

How can I do it? I just want to completly erase the contents of my current repository.

Thanks

Upvotes: 0

Views: 2133

Answers (3)

Blender
Blender

Reputation: 298552

This SO duplicate says:

svn checkout --depth immediates http://myrepo.com/svn/myrepo myworking_copy
cd myworking_copy
svn rm *
svn ci -m "Deleting all"

As far as I can tell, since the repository is remotely stored, it would be easier to just remove it from the source and start from scratch.

Upvotes: 1

DarenW
DarenW

Reputation: 16926

The contents of a repository can never disappear. The closest you can do is make it look empty by checking in an emptied working directory. But all previous revisions are still tracked, with all the files.

I learned the hard way a few years ago not to check in giant data files on one machine and check them out on another as a way of "transferring" them. It made my repo extremely bloated. I used dump and load with some filtering to rebuild the repo without those giant files.

The best thing may be to delete the actual repository (not just its contents) - the whole thing wherever it resides and build a new one from scratch.

Upvotes: 2

Assaf Adato
Assaf Adato

Reputation: 237

removing the repository folder will do the trick.

rm -r /usr/local/svn/repo

Upvotes: 4

Related Questions