Deleting SVN Revisions

Say you have a large SVN repo with 617 commits. You want to physically delete the last 6 so you’re back to r611. You do not want the data contained in these revisions to exist so svn revert is not appropriate.

The most elegant way of killing off r612-r617 is to make a SVN dump up until revision r611 and then restore from it.

Dump the server-side SVN folder and then move it aside:

svnadmin dump myrepo/ -r r1:r611 > myrepo.dump
mv myrepo myrepo.old

Recreate a fresh repo and import the dump
svnadmin create myrepo
svnadmin load myrepo < myrepo.dump

You’re done.