Skip to content

spo app remove

Removes the specified app from the specified app catalog

Usage

spo app remove [options]

Options

Option Description
--help output usage information
-i, --id <id> ID of the app to remove. Needs to be available in the app catalog
-u, --appCatalogUrl [appCatalogUrl] URL of the tenant or site collection app catalog. It must be specified when the scope is sitecollection
-s, --scope [scope] Scope of the app catalog: tenant|sitecollection. Default tenant
--confirm Don't prompt for confirming removing the app
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

Before using this command, log in to a SharePoint Online site, using the spo login command.

Remarks

To remove an app from the tenant or site collection app catalog, you have to first log in to a SharePoint site using the spo login command, eg. spo login https://contoso.sharepoint.com.

When removing an app from the tenant app catalog, it's not necessary to specify the tenant app catalog URL. When the URL is not specified, the CLI will try to resolve the URL itself. Specifying the app catalog URL is required when you want to remove the app from a site collection app catalog.

When specifying site collection app catalog, you can specify the URL either with our without the AppCatalog part, for example https://contoso.sharepoint.com/sites/team-a/AppCatalog or https://contoso.sharepoint.com/sites/team-a. CLI will accept both formats.

If the app with the specified ID doesn't exist in the app catalog, the command will fail with an error.

Examples

Remove the specified app from the tenant app catalog. Try to resolve the URL of the tenant app catalog automatically. Additionally, will prompt for confirmation before actually retracting the app.

spo app remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3

Remove the specified app from the tenant app catalog located at https://contoso.sharepoint.com/sites/apps. Additionally, will prompt for confirmation before actually retracting the app.

spo app remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --appCatalogUrl https://contoso.sharepoint.com/sites/apps

Remove the specified app from the tenant app catalog located at https://contoso.sharepoint.com/sites/apps. Don't prompt for confirmation.

spo app remove --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --appCatalogUrl https://contoso.sharepoint.com/sites/apps --confirm

Remove the specified app from a site collection app catalog of site https://contoso.sharepoint.com/sites/site1.

spo app remove --id d95f8c94-67a1-4615-9af8-361ad33be93c --scope sitecollection --appCatalogUrl https://contoso.sharepoint.com/sites/site1/AppCatalog

More information