How do I completely remove a file/folder from a Subversion repository?

To remove a file or folder and all history from an SVN repository, create a dump of the existing repository and filter out the unwanted file or folder. Then create a new repository to replace the existing repository.

The process to completely remove a file or folder from a repository involves several steps. Use the following steps to completely remove an existing file or folder and all history from your current live repository:
Create a dump of the existing repository:

svnadmin dump [path_to_repo] > dumpfile1

Filter out the unwanted file/folder:

svndumpfilter exclude [path_to_file/folder] < dumpfile1 > filtered_dumpfile

Create a new repository, to swap for the live repository:

svnadmin create repo_temp

Load the filtered dumpfile to new repository:

svnadmin load repo_temp < filtered_dumpfile

Verify the new repository and replace the live repo with the new repository:

rm [path_to_live_repo] -rfmv repo_temp live_repo

From: http://help.collab.net/index.jsp?topic=/faq/removefile.html
Reference: http://svnbook.red-bean.com/en/1.0/ch05s03.html

Leave a Reply

Your email address will not be published. Required fields are marked *