title: geoserver: deleting a file from a datastore via REST
body: <p>I'm pretty new to geoserver so pardon me if this is a noob question. I've spent a good bit of time on Google, Stack Overflow and even reading TFM trying to figure this out.</p>
  
  <p>To add the file to the datastore I'm using the following form</p>
  
  <pre><code>PUT http://myserver:myport/geoserver/rest/workspaces/workspace/datastores/datastore/file.shp
  </code></pre>
  
  <p>The documentation specifically says that this endpoint is only for deleting or updating/overwriting an item.</p>
  
  <p>I tried deleting the item as a layer</p>
  
  <pre><code>DELETE http://myserver:myport/geoserver/rest/layers/layerid.xml
  </code></pre>
  
  <p>At first I thought this worked, but then it showed up in the WFS GetCapabilities request and I found the data was still in the shape file directory.</p>
  
  <p>Any advice on this? I can't just delete the Layer and the FeatureType and call it good. The data needs to be removed from the datastore.</p>