Question: I have a remote database that can change at any time. I need to find a way to keep my sqlite database update with all the changes in the better and optimised way possible. 

I thought having a single timestamp per table and send only the updated table to the client would be one solution, or maybe having one timestamp per row and sending only the updated row to the client..

But 
- how can i manage deleted items, for example?
- how can i manage the technical update on Android?

Basically, in a few words, at some point in the app, i need to download the changes with an API and update the local db.

Does anyone have some ideas?

Thanks

Answer: 
Was your VM deployed in Classic model or ARM model?

If the disks were attached to classic VM, and you selected a subscription which has these disks, you should be able to see all of them by Get-AzureDisk command. (The syntax you provided is correct.) 

If the disks were attached to classic VM but you are not sure which subscription you have selected, see your current subscription by **Get-AzureSubscription** command. If you want to select other subscriptions, use [Select-AzureSubscription](https://msdn.microsoft.com/en-us/library/dn495203.aspx) command.

If your disks were detached from ARM VM or your ARM VM was deleted without deleting the disk, you can delete disks from **Azure portal** (<https://portal.azure.com>). Select Storage Accounts, then click on the storage account where your unattached VHD's are located, Click Blobs, click the container containing VHD, search for/click the vhd and click delete. 

Note that there’s no direct PowerShell command for getting the Azure ARM VM disks. However, for existing VM and attached disks, you could use *Get-AzureRmVM* to return data disks as part of the VM return, then use *Remove-AzureRmVMDataDisk* command to delete ARM data disks. (This might not apply to your scenario since you are looking for unattached disks.)

Please be sure you select the right subscription and choose a corresponding command/action for different deployment models. 

Let us know if it helps. Thanks!
to my opinion, this code is clean, simple, and does the job.

```
$disksList =  (Get-AzDisk | select  DiskState,Name,ResourceGroupName | where DiskState -eq 'Unattached')

  foreach($disk in $disksList){

    Remove-AzDisk -DiskName $disk.Name -ResourceGroupName $disk.ResourceGroupName -Force

  }

```