title: Can ClickOnce be configured to delete off old published directories?
body: <p><strong>Can ClickOnce be configured to delete off old published directories?</strong></p>
  
  <p>Or </p>
  
  <p><strong>Has anyone written some code that will delete off these publish directories (maybe keeping the last 10)?</strong></p>
  
  <p>Currently, every time a ClickOnce Publish is done a new directory is being created on the IIS Server. This NEW directory contains a copy of the whole application, which is downloaded. The old directories do not seem to be used anymore and is just taking up a lot of space.  </p>
  
  <p>Here is a sample of the directory names being created. As you can see the application version number is being used in the name.<br>
  EduBenesysNET_1_0_1_0<br>
  EduBenesysNET_1_0_1_1<br>
  ….<br>
  EduBenesysNET_1_0_1_192<br>
  EduBenesysNET_1_0_1_193  </p>
  
  <p>We have had 194 (zero based) builds with each directory staying out there. With the size of one build being about 50mb, you can see how keeping the old directories out there will start to eat away at the disk space.</p>
  
  <p>The way our application works is you always have to download the latest version. You do not have an option to skip the download so I am hoping that deleting off the old directories should not be a problem.</p>