<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mustafa</title>
    <description>The latest articles on DEV Community by Mustafa (@tantawi0).</description>
    <link>https://dev.to/tantawi0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3910723%2F396d91f5-c14d-43d8-bcd3-2c4ca6dc2f72.jpg</url>
      <title>DEV Community: Mustafa</title>
      <link>https://dev.to/tantawi0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tantawi0"/>
    <language>en</language>
    <item>
      <title>How to Find Wasted Azure Resources in Your Subscription (With Real Examples)</title>
      <dc:creator>Mustafa</dc:creator>
      <pubDate>Sun, 03 May 2026 17:53:52 +0000</pubDate>
      <link>https://dev.to/tantawi0/how-to-find-wasted-azure-resources-in-your-subscription-with-real-examples-3np8</link>
      <guid>https://dev.to/tantawi0/how-to-find-wasted-azure-resources-in-your-subscription-with-real-examples-3np8</guid>
      <description>&lt;p&gt;Azure bills are frustrating because the waste is almost never obvious. It hides in places you forget to check. This post covers the most common sources of wasted Azure spend I've seen across multiple subscriptions — with the exact CLI commands to find them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unattached Managed Disks
&lt;/h3&gt;

&lt;p&gt;When you delete a VM in Azure, the disks are not automatically deleted unless you explicitly checked the box at creation time. Most teams don't. The result: dozens of orphaned disks billing you every month for nothing.&lt;/p&gt;

&lt;p&gt;Find them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az disk list &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"[?diskState=='Unattached'].{Name:name, Size:diskSizeGb, SKU:sku.name, RG:resourceGroup}"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A Premium SSD P30 (1 TB) costs around €130/month. A P20 (512 GB) around €65/month. Run this command on a subscription that has been active for 2+ years and the results are usually surprising.&lt;/p&gt;

&lt;h3&gt;
  
  
  Oversized VMs Running at Low CPU
&lt;/h3&gt;

&lt;p&gt;Pull 14 days of average CPU for all your VMs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az monitor metrics list &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resource&lt;/span&gt; /subscriptions/&lt;span class="o"&gt;{&lt;/span&gt;sub-id&lt;span class="o"&gt;}&lt;/span&gt;/resourceGroups/&lt;span class="o"&gt;{&lt;/span&gt;rg&lt;span class="o"&gt;}&lt;/span&gt;/providers/Microsoft.Compute/virtualMachines/&lt;span class="o"&gt;{&lt;/span&gt;vm-name&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--metric&lt;/span&gt; &lt;span class="s2"&gt;"Percentage CPU"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--interval&lt;/span&gt; PT1H &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--aggregation&lt;/span&gt; Average &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--start-time&lt;/span&gt; 2026-04-17T00:00:00Z &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--end-time&lt;/span&gt; 2026-05-01T00:00:00Z &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any VM averaging under 10% CPU with peaks under 40% is a strong candidate for downsizing. A D8s_v3 → D4s_v3 saves ~50% of that VM's cost with no performance impact for low-utilisation workloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unused Public IP Addresses
&lt;/h3&gt;

&lt;p&gt;Static IPs are €3–5/month each. Subscriptions accumulate them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az network public-ip list &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"[?ipConfiguration==null].{Name:name, RG:resourceGroup, SKU:sku.name}"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dev/Test VMs Without Auto-Shutdown
&lt;/h3&gt;

&lt;p&gt;Any VM that runs overnight and on weekends when nobody uses it is burning ~65–70% of its cost for nothing. Enable auto-shutdown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az vm auto-shutdown &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;resource-group&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;vm-name&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;--time&lt;/span&gt; 1900
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the time in UTC. This single command can cut a dev VM's monthly cost by more than half.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storage Accounts Still in Hot Tier
&lt;/h3&gt;

&lt;p&gt;Old backups, log archives, and export files sitting in Hot tier cost 3–9x more than they should.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az storage account list &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"[].{Name:name, Kind:kind, AccessTier:accessTier, RG:resourceGroup}"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check each storage account's actual access patterns in Azure Monitor. Anything accessed less than once a month belongs in Cool or Archive tier.&lt;/p&gt;




&lt;p&gt;I built &lt;a href="https://prunr.cloud" rel="noopener noreferrer"&gt;Prunr&lt;/a&gt; to automate all of this — it runs scanners across your Azure subscription and surfaces the specific resources wasting money with savings estimates, in about 30 seconds. Free tier available. But the CLI commands above will get you started without any tooling.&lt;/p&gt;

&lt;p&gt;What waste patterns have you found in Azure subscriptions? Curious what others are seeing.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>cloud</category>
      <category>finops</category>
    </item>
  </channel>
</rss>
