Quick Answer: Use the Azure Portal to delete unused resources to stop billing, and enable retention policies to keep data for 7 to 90 days before deletion. This saves money and keeps your account clean.
Azure resources like virtual machines, storage accounts, and app services are billed continuously until you delete them. To stop charges, you must remove the unused items. You should also set up automatic retention policies so that old, unused data is not kept indefinitely. This guide shows you how to find what to delete and how to keep your Azure account tidy.
Signs You Need to Declutter
Run the following checks in the Azure Portal to see if you have unused resources. Look for these signs:
- High monthly cost: Your bill is higher than expected and you do not recognize all the charges.
- Old resources: You have virtual machines, networks, or storage created more than 30 days ago that you do not use.
- Missing tags: Resources do not have tags that indicate who owns them or what project they belong to.
- Stale backups: You have backup jobs that have not run or have failed for weeks.
How to Find Unused Resources
You can find unused resources by using cost management tools and manual checks. Follow these steps to identify items that can be deleted.
-
Log in to the Azure Portal at portal.azure.com.
-
Navigate to the Cost Management + Billing service.
-
Select Cost analysis from the left menu.
-
Filter the data by the last 30 or 90 days.
-
Sort the list by cost to see which resources use the most money.
-
Review the list for resources that have high cost but low usage. High usage means the resource is likely in use. Low usage or no usage suggests the resource may be idle.
-
Click on a resource to open its details page.
-
Check the Usage blade for the last 30 days. Look at the Requests and Data processed metrics. If these numbers are near zero, the resource is likely not in use.
How to Delete Unused Resources
Once you have identified a resource that is no longer needed, you can delete it. Be careful not to delete resources that are still in use.
-
Navigate to the resource you want to delete in the Azure Portal.
-
Select the Overview blade for the resource.
-
Click the Delete button at the top of the blade. The button is usually in the top-right corner.
-
Confirm the deletion when prompted. You may need to type the resource name to confirm.
-
Wait for the deletion to complete. The resource will disappear from the list once the operation is finished.
How to Set Up Retention Policies
Retention policies are rules that automatically delete resources or data after a set period. This prevents you from forgetting to clean up old items.
For Storage Accounts
Storage accounts can hold blobs, files, and tables. You can set policies to delete old blobs.
-
Navigate to your storage account in the Azure Portal.
-
Select Data management from the left menu.
-
Click Lifecycle management.
-
Click Add rule.
-
Enter a name for the rule, such as “Delete old logs”.
-
Set the rule scope to apply to all blobs or specific containers.
-
Choose a condition based on age. For example, “Blob exceeds 30 days old”.
-
Choose an action. Select “Delete the blob”.
-
Click Save.
For Virtual Machines
You can stop and deallocate virtual machines to stop billing. You can also set up auto-shutdown rules.
-
Navigate to your virtual machine in the Azure Portal.
-
Select Automation from the left menu.
-
Click Run command and choose a command that shuts down the VM.
-
Alternatively, go to the Overview blade and click Stop under the management section.
-
To set up a schedule, go to Automation > Scheduled run commands.
-
Create a new schedule and attach the shutdown command to it.
-
Set the time and frequency for the shutdown. This ensures the VM is turned off during off-hours.
What Goes Wrong
Common mistakes can lead to lost data or unexpected costs. Be aware of these pitfalls when decluttering.
- Deleting production resources: Always verify that a resource is not in use before deleting it. Check the usage metrics and confirm with your team.
- Forgetting backup retention: If you delete a resource, its backups may still exist. Set retention policies on backups to delete them after a set time.
- Not checking dependent resources: Some resources depend on others. For example, a network interface may depend on a virtual machine. Deleting the VM may fail if the network interface is still attached.
- Skipping tags: Without tags, it is hard to track ownership. Tag resources with the owner’s name and project name to prevent accidental deletion.
How to Check If You Saved Money
After you delete resources and set up policies, you can verify the impact on your bill.
-
Review your Cost Management + Billing > Cost analysis page.
-
Compare the current month to the same month last year.
-
Look at the Cost by resource chart. See if the top resources have lower costs.
-
Use the Forecast feature to see if your future spending is lower.
Common Questions
Can I Restore a Deleted Resource?
Some resources, like deleted blobs in a storage account, can be restored if they are still within the retention period. For other resources, like virtual machines, you must recreate them. Always back up important data before deleting resources.
Do Retention Policies Apply Immediately?
Retention policies are applied after the condition is met. For example, a rule that deletes blobs older than 30 days will not delete a blob until it is 30 days old. The first deletion happens after the 30-day mark.
What Happens If I Stop a Virtual Machine?
Stopping a virtual machine stops the billing for compute. However, you may still be billed for storage and networking resources attached to it. To stop all billing, you must delete the virtual machine.
How Often Should I Check for Unused Resources?
You should check for unused resources at least once a month. Monthly reviews help you catch resources that were not deleted in previous cleanup efforts.
Related
- Budget Knitting Course Checklist: What You Need
- Coffee Course Minimal Routine Explained
- Gardening Course Tips: How to Learn and Apply Effectively
General information for everyday wellbeing, not medical advice. If something affects your health, sleep or mood for more than a short while, talk to a qualified professional. Read more
Spotted an error? Tell us and we will correct it (corrections policy).