Hi Cristóbal Cea,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
We understand from your query that you are experiencing an issue while trying to delete Network Interface. I have I have tried from my end and shared troubleshooting steps:Open Azure Cloud shell and try below commands:
List all resources in Resource group: az resource list --resource-group <ResourceGroup> --output table
List all NICs in the Resource group: az network nic list --resource-group <ResourceGroup> --output table
Try this command first to delete NIC: az network nic delete --resource-group <RESOURCE_GROUP> --name <yourtNIC>
If the error shows again, try below steps:
Check the NICs properties: az network nic show --name <your_NIC> --resource-group <RESOURCE_GROUP>
Confirm the virtual Machine property still points to the deleted VM.
Disassociate the NIC from Virtual Machine: az network nic update --name <your_NIC> --resource-group <RESOURCE_GROUP> --remove virtualMachine
Now try deleting NIC: az network nic delete --resource-group <RESOURCE_GROUP> --name <your_NIC>
If you still find any difficulties, please let me know I would like to work closer on this issue. If the answer is helpful, please click "Accept Answer" and "Upvote it" as it can be helpful to others in the community.