title: Cannot Delete Virtual Network Gateway in Azure
body: <p>I am attempting to delete a virtual network in Azure. When I use the web interface to delete it, it says</p>
  
  <pre><code>Virtual network 'MyVirtualNetwork' is in use and cannot be deleted. If you recently deleted resources, it might take some time to update the virtual network.
  </code></pre>
  
  <p>Of course, I didn't recently delete resources and there are no VMs using the network. I followed this StackOverflow post <a href="https://stackoverflow.com/questions/18952969/azure-virtual-network-unable-to-delete">here</a> which says that in order to delete a Virtual Network, you must first delete the Virtual Network Gateway.</p>
  
  <p>So, as per the instructions "To delete a virtual network gateway" on MSDN <a href="http://msdn.microsoft.com/library/azure/dn221918.aspx" rel="nofollow noreferrer">here</a>, I click through the Azure web interface like this:</p>
  
  <pre><code>Virtual Network &gt; *MyVirtualNetwork* &gt; Dashboard &gt; Delete Gateway
  </code></pre>
  
  <p>And I get this:</p>
  
  <pre><code>Failed to delete the gateway for virtual network 'OneCoreWikiVnet'.
  </code></pre>
  
  <p>Azure offers no further explanation or other details.</p>
  
  <p>How do I delete this virtual network gateway?</p>