Skip to content

New Sample - Cleanup a SPFx Solution from every Site and App Catalog#943

Open
fabianhutzli wants to merge 1 commit intopnp:mainfrom
fabianhutzli:main
Open

New Sample - Cleanup a SPFx Solution from every Site and App Catalog#943
fabianhutzli wants to merge 1 commit intopnp:mainfrom
fabianhutzli:main

Conversation

@fabianhutzli
Copy link
Copy Markdown

This PR adds a new PnP PowerShell script that fully removes a SPFx solution from a SharePoint Online tenant.

The script covers the complete cleanup flow:

  • Iterates over all site collections in the tenant
  • Uninstalls the app from every site where it is actively deployed
  • Clears matching recycle bin entries per site (apps land there after uninstall)
  • Removes the app package from the tenant app catalog
  • Clears the app catalog recycle bin to ensure no package remnants remain

This is useful when you need a complete removal before a reinstall, or when retiring a solution tenant-wide.

Script details

  • Tool: PnP PowerShell
  • Product: SharePoint Online
  • Category: Deploy
  • Commands used: Get-PnPTenantSite, Get-PnPApp, Uninstall-PnPApp, Remove-PnPApp, Get-PnPRecycleBinItem, Clear-PnPRecycleBinItem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant