title: How do you uninstall all your bower packages?
body: <p>Sometimes it's useful to rebuild an entire site and force bower to reinstall new versions of all the packages in bower.json.</p>
  
  <p>However, there doesn't seem to be any way of doing that:</p>
  
  <h3>Attempt #1:</h3>
  
  <pre><code>$ bower uninstall
  bower not-installed 0
  </code></pre>
  
  <p>Nope, that only works on a package-by-package basis, even though a clean 'bower install' uses bower.json. </p>
  
  <h3>Attempt #2:</h3>
  
  <pre><code>$ bower install -f -l 0
  $
  </code></pre>
  
  <p>Nope, despite '-f', this does absolutely nothing if the dependencies are met.</p>
  
  <h3>Attempt #3:</h3>
  
  <pre><code>$ rm -r bower_components
  $
  </code></pre>
  
  <p>! Ah victory! ... wait, what's this?</p>
  
  <pre><code>rm: bower_components: No such file or directory
  </code></pre>
  
  <p>Oh darn, there's a .bowrc in this project that sets the directory to install things to.</p>
  
  <h3>My current terrible solution:</h3>
  
  <p>Run custom script that:</p>
  
  <pre><code>- Parse .bowerrc if one exists
  - Load the directory if one is specified in the json block
  - If the directory currently exists...
  - ...recursively delete the directory.
  </code></pre>
  
  <p>It works, I suppose, but it's pretty annoying to have to setup repeatedly.</p>
  
  <p>Am I missing something?</p>
  
  <p>Is there not just a simple bower command to delete the local installed modules?</p>
  
  <p>Seems like really basic functionality I would expect bower uninstall to do.</p>
  
  <p>(This isn't really a very javascript question, but I'll happily accept something that hooks into the bower module somehow to make this happen in a simple node script)</p>
  
  <h3>Context</h3>
  
  <p>Edit: If you want 'motivation' for such a task, it's this: We have a jenkins server that builds our projects and runs tests. However, periodically it fails for no obvious reason; investigating, it's almost <em>always</em> because jenkins is using a previous copy of the repository with just a git-pull to update to the most recent version before building and running tests; as a result, the previous bower_components directory is there, and it is full of cached copies of the various components.</p>
  
  <p>Here a few example of things which are #@$@#$'d and require bower to be run again as a forced install:</p>
  
  <p>1) Some idiot (>_> fitvids) deletes the previous tagged release of a project.</p>
  
  <p>2) Some project has dropped off of bower / moved its github page</p>
  
  <p>3) Some project (>_> jquery) has changed the way the files are laid out in a non-major version revision.</p>
  
  <p>I realize that the 'correct' solution to this problem is: fix jenkins so it creates a new temporary directory for each build. ...but that's not in my control.</p>
  
  <p>So, as a build step, I need to automate a way to delete the bower components and force them to all be reinstalled; either as a grunt task (part of the build) or a jenkins build step. However, remember from (3) above, that our projects use .bowerrc, so it's not as simple as simply deleting a folder.</p>
  
  <p>It would be great if I could uninstall all the existing bower components as a pre-build step to make this work.</p>
  
  <p>So... back to the question: Can this be done with bower?</p>