Hi there,
Azure VMs have a capability to run commands from Azure. You can automate this by using Azure Automation Account, Azure Functions (by enabling managed identities in these VMs).
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/run-command
Here you can run your own scripts\commands to clean-up space