title: Puppet: how to remove a directory and everything in it
body: <p>I'm sure this is really simple, but I cannot work it out.</p>
  <p>I want to delete the directory <code>C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1</code>. My attempts thus far have managed to remove everything inside the directory <code>1.0.0.1</code>, but I can't work out how to remove the actual directory.</p>
  <p>I did think about going up a level, but that would mean that when I copy across the new version of this module (<code>2.2.5</code>), on the next run, Puppet will delete it.</p>
  <p>Here are my two attempts:</p>
  <h3>file resource</h3>
  <pre><code>file { &quot;${modules_path}/PowerShellGet/1.0.0.1&quot; :
    ensure  =&gt; directory,
    recurse =&gt; true,
    purge   =&gt; true,
    force   =&gt; true,
  }
  </code></pre>
  <h3>tidy resource</h3>
  <pre><code>tidy { &quot;${modules_path}/PowerShellGet/1.0.0.1&quot; :
    age     =&gt; 0,
    recurse =&gt; true,
    rmdirs  =&gt; true,
  }
  </code></pre>
  <p>T.I.A</p>