<p>As the local subversion czar i explain to everyone to keep only source code and non-huge text files in the repository, not huge binary data files.  Smaller binary files that are parts of tests, maybe.    </p>

<p>Unfortunately i work with <em>humans</em>!  Someone is likely to someday accidentally commit a 800MB binary hulk. This slows down repository operations.  </p>

<p>Last time i checked, you can't delete a file from the repository; only make it not part of the latest revision.  The repository keeps the monster for all eternity, in case anyone ever wants to recall the state of the repository for that date or revision number.  </p>

<p>Is there a way to really delete that monster file  and end up with a decent sized repository?   I've tried the svnadmin dump/load thing but it was a pain.</p>

[{'answer_id': 80912, 'author': 'Veynom', 'author_id': 11670, 'author_profile': 'https://Stackoverflow.com/users/11670', 'pm_score': 4, 'selected': False, 'text': '<p>To permanently delete monster files from a svn repository, there is no other solution than using svnadmin dump/load. (<a href="http://svnbook.red-bean.com/en/1.4/svn.ref.svnadmin.c.dump.html" rel="noreferrer">SVN Book: dump command</a>)</p>\n\n<p>To prevent huge files from being committed, a hook script can be used. You could have, for example, a script that ran "pre-commit" whenever someone tried to commit to the repository. The script might check filesize, or filetype, and reject the commit if it contained a file or files that were too large, or of a "forbidden" type.</p>\n\n<p>More typical uses of hook scripts are to check (pre-commit) that a commit contains a log message, or (post-commit) to email details of the commit or to update a website with the newly committed files. </p>\n\n<p>A hook script is a script that runs in response to response to repository events (<a href="http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks" rel="noreferrer">SVN Book: Create hooks</a>).</p>\n'}, {'answer_id': 81042, 'author': 'Bert Huijben', 'author_id': 2094, 'author_profile': 'https://Stackoverflow.com/users/2094', 'pm_score': 1, 'selected': False, 'text': "<p>Once you removed the file from your HEAD revision, it doesn't slow you down on operation speed as ony deltas between revisions are handled. \n(Repository backups must of course handle the load).</p>\n"}, {'answer_id': 85409, 'author': 'Max Cantor', 'author_id': 16034, 'author_profile': 'https://Stackoverflow.com/users/16034', 'pm_score': 2, 'selected': False, 'text': "<p>If you can catch it as soon as it's committed, the svnadmin dump/load technique isn't too painful.  Suppose someone just accidentally committed gormundous-raw-image.psd in Revision 3849.  You could do this:</p>\n\n<pre><code>svnadmin dump /var/repos -r 1:3848 &gt; ~/repos_dump\n</code></pre>\n\n<p>That would create a dump file containing everything up to and including Revision 3848.  At that point, you could use svnadmin create and svnadmin load to reconstitute the repository without the offending commit, the caveat being that any changes you made within the repository's directory structure--hooks, symlinks, permission changes, auth files, etc.--would need to be copied over from the old directory.  Here's an example of the rest of the bash session you might use to complete the operation:</p>\n\n<pre><code>svnadmin create /var/repos-new\nsvnadmin load /var/repos-new &lt; ~/repos_dump\ncp -r /var/repos/conf /var/repos-new\ncp -r /var/repos/hooks /var/repos-new\nmv /var/repos{,-old} &amp;&amp; mv /var/repos-new /var/repos\n</code></pre>\n\n<p>I'm sure this will be more painful the more history your repository has, but it does work.</p>\n"}, {'answer_id': 97231, 'author': 'Sander Rijken', 'author_id': 5555, 'author_profile': 'https://Stackoverflow.com/users/5555', 'pm_score': 5, 'selected': True, 'text': '<p>Some extra info about this can be found at the blog post: <a href="http://blog.projectnibble.org/2008/03/01/subversion-obliterate-the-forgotten-feature/" rel="nofollow noreferrer">Subversion Obliterate, the missing feature</a></p>\n\n<p>Be sure to read through the comments too, where Karl Fogel puts the article into perspective :-)</p>\n'}]
['https://Stackoverflow.com/questions/80833', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10468/']