02/10/05: How to Obliterate Files From Subversion

Here's how to obliterate files from the repository. Note that using the subversion remove command will not remove it from your repository. I had to use it as I noticed I put friends' e-mail addresses in by accident.

The following commands move the repository to a backup location, dumps the database in a file. Finally I remove the file .nobunce from the repository. You can specify multiple files to remove.

mv subversion subversion.bak
svnadmin dump subversion.bak > dump
svndumpfilter exclude trunk/ivan/.nobounce < dump > dump.filter

Now I recreate a fresh repository and load the new new dump file minus the offending file. You can delete subversion.bak when you feel confident that your new repository is working.

svnadmin create --fs-type fsfs subversion
svnadmin load subversion < dump.filter

According to the subversion documentation, there will be a command called obliterate that will do the above without the hassle.

back