I'm trying to delete the home library as it is not needed anymore. Unfortunately, there isn't a 'delete library' option under the permissions section. Does anyone know how to delete this library? I have tried the following (see screenshot):enter image description here

Hopefully, I'm doing something wrong.

2 Answers 2


Please see below your updated PowerShell code to delete library

SharePoint On-premises

$web = Get-SPweb "Site Url"
$list = $web.Lists["Documents"]
$list.AllowDeletion =$true

Office 365

$SiteUrl = "Site Url"
$Cred = Get-Credential
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$ctx.Credentials = $Credentials


$list.AllowDeletion = $true


Note: For Office 365 you need SharePoint Online Management Shell install on your machine. That you can download from below link

SharePoint Online Management Shell

  • I got it to work. Thanks again!
    – Lando
    Commented Apr 9, 2019 at 17:23

Looks like you are using SharePoint Online.

In this case, you can use the PnP PowerShell to interact with SPO and perform operations.

Simply install the module as below:

Install-Module SharePointPnPPowerShellOnline

After that, you can delete the list as below:

Connect-PnPOnline -Url "<https://site-collection-url>"
Remove-PnPList -Identity Documents -Force

References - PnP-PowerShell


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.