title: Should old/legacy/unused code be deleted from source control repository?
body: <p>I've encountered this in multiple projects. As the code base evolves, some libraries, applications, and components get abandoned and/or deprecated.</p>
  
  <ol>
  <li><p>Most people prefer to keep them in. The usual argument is that the code does not really take any space, it can be left alone until needed again.<br>
  So a repository slowly turns into a cesspool of legacy code, where it's hard to find anything.<br>
  Another argument for keeping old code around is that new people will not be tempted to try to implement something that was implemented in the past, but didn't quite work out.</p></li>
  <li><p>Some people delete old code, since it creates clutter, raises more questions for new people, and you can restore any old snapshot of the code base anyway.<br>
  However you can't always find the old code if you don't know where to look, as none of the (common) VCS I know offer search over the entire repository including all historical revisions, and the only way to search the old files is to check out the revision where the deleted file exists.</p></li>
  </ol>
  
  <p>What would be a good approach to repository management?</p>