To resolve this problem you need to remove your SharePoint Add-In by PowerShell so the following script demonstrate how to Uninstall SharePoint Add-in in SharePoint Online:
Note : You must have SharePoint Online Client Components SDK
installed on the system.
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
Function Get-ClientContext([string]$Url,[string]$UserName,[string]$Password)
{
$SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
$context = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)
return $context
}
Function Uninstall-AppInstance([Microsoft.SharePoint.Client.ClientContext]$Context,[Guid]$AppInstanceId)
{
$appInst = $Context.Web.GetAppInstanceById($AppInstanceId)
$appInst.Uninstall()
$context.ExecuteQuery()
}
$UserName = "jdoe@contoso.onmicrosoft.com"
$Password = Read-Host -Prompt "Enter the password"
$Url = "https://contoso.sharepoint.com/"
$AppInstanceid = New-Object Guid("XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX") #specify App Instance Id here
$context = Get-ClientContext -Url $Url -UserName $UserName -Password $Password
Uninstall-AppInstance -Context $context -AppInstanceId $AppInstanceid
$context.Dispose()
How to get App Instance Id
- Go to your SharePoint Add-in then try click the ellipses (...) beside the application like image below then click DETAILS :

Once the detail page will be opened, App Instance Id could be grabbed from Url :
/_layouts/15/AppMonitoringDetails.aspx?AppInstanceId=XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX