SharePoint Online: How to Remove an App using PowerShell?

Requirement: Remove an App from SharePoint Online using PowerShell.

How to Remove an App from SharePoint Online Site?

Apps that have been added to the SharePoint sites can later be removed if they are not needed. If you want to remove a specific app from the SharePoint Online site, do the following:

Make sure you are in classic SharePoint UI by clicking on the “Return to classic SharePoint” link at the bottom-left.
  1. Login to your SharePoint Online site where you want to remove the app >> Click on Settings gear >> Choose “Site Contents” from the settings menu.
  2. On the site contents page, Hover-over the app you wish to remove and click on the ellipsis (…). In the settings popup window, click on the ellipsis (…)  again and then click Remove.
    remove app from sharepoint online
  3. When prompted to remove the app, confirm by clicking OK.

PnP PowerShell to Remove an App from SharePoint Online Site:

We can also remove an app from the SharePoint Online site collection using the PnP PowerShell script.

$SiteURL = ""
$AppName = "Adobe Sign"
#Connect to SharePoint Online App Catalog site
Connect-PnPOnline -Url $SiteURL -Interactive

#Get the App Instance from Site
$App = Get-PnPApp | Where {$_.Title -eq $AppName}
#UnInstall App from the Site
Uninstall-PnPApp -Identity $App.Id

The selected app instance will be removed from the given site collection. However, If an app is no longer needed but has been deployed to a site, you will need to remove it from the App Catalog as well. You can also uninstall an app instance using PowerShell CSOM script SharePoint Online: Remove App using PowerShell

Please note, If an app is deployed through the tenant app catalog, both the above methods will not work! You will not get the “Remove” option for apps in the browser, and the PowerShell method also won’t work! These methods work only for app instances you added to the site directly. So to remove those app instances you have to uninstall them using the tenant app catalog as below

Removing a deployed app from the Tenant App Catalog

If an app is deployed through the app catalog to your SharePoint Online sites, You can remove that from multiple sites using the App catalog site without requiring to remove it from each individual site.

  1. Login to the SharePoint Online App Catalog site as an administrator
  2. Click on Settings >> Site contents. Select the ellipsis (…) next to the app you want to remove from other sites and select the ellipsis (…) again in the popup window. Select “Deployment”.
    sharepoint online remove app powershell
  3. The deployment page of the app lists all site collections to which the particular app instances are deployed. Select the sites from the site collections list and click on “Remove” to remove the app instance from selected sites. (If you want to delete the app instances from all sites, remove every site listed in the site collections list).
  4. Click OK at the bottom of the screen and then confirm the removal by clicking on the “Trust It” button in the confirmation popup window.

The app will be removed from selected site collections and disappear from the site contents page.

Removing an App from the App Catalog

If you no longer want an app to be available for users to install from the App Catalog, you can remove it. To remove an app from the App Catalog, do the following:

  1. Navigate to the App Catalog site and click on “Site contents”.
  2. Hover over the app to remove, select the ellipsis (…), and choose the Remove option from the pop-up menu.
  3. On the deletion confirmation screen, select the OK button to remove the app.

Delete App from the “Apps for SharePoint” list

For custom apps deployed to apps for SharePoint list in the App Catalog site,

  1. Click on “Apps for SharePoint” in the left navigation (or from the site contents page)
  2. Select the app you want to remove, click on “Delete.” and confirm.

Once the app is removed from the App Catalog, Users will no longer be able to add it to sites but existing app instances continue to work.

PnP PowerShell to Remove an App from App Catalog

Here is how to remove an App from SharePoint Online using the PnP PowerShell cmdlet Remove-PnPApp:

$AppCatalogSiteURL = ""
$AppName = "File Controller"
#Connect to SharePoint Online App Catalog site
Connect-PnPOnline -Url $AppCatalogSiteURL -Interactive

#Get the from tenant App catalog
$App = Get-PnPApp -Scope Tenant | Where {$_.Title -eq $AppName}

#Remove an App from App Catalog Site
Remove-PnPApp -Identity $App.Id

Still finding the 3rd party app under “Apps you can Add”?

Well, you need to do one extra step if an app is still listed in your site collection under “Apps you can add”.

  1. Navigate to the SharePoint Online admin site
  2. Click on More Features >> Click on “Open” under App Catalog
  3. Click on the “Manage Licenses” link under the Apps page,
  4. Select the app to remove >> Click on “Actions” >> Remove this license.

Now, the app should disappear from the “apps you can add” section of the site contents page.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

2 thoughts on “SharePoint Online: How to Remove an App using PowerShell?

Leave a Reply

Your email address will not be published. Required fields are marked *