First of all, make sure you have the enough permission to delete lists:
If the user permission is right, please go to list settings to check if you could see following option:
If none of the above works, we can turn ON allow deletion flag and then delete a list by sending it to recycle bin in SharePoint Online with PowerShell-CSOM:
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
#Set parameter values
$SiteURL="https://test.sharepoint.com/sites/Team1"
$LibraryName="list75"
Try {
#Get Credentials to connect
$Cred= Get-Credential
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
#Setup the context
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Credentials
#Get the Document Library and set allow deletion flag
$Library=$Ctx.Web.Lists.GetByTitle($LibraryName)
$Library.AllowDeletion = $True
$Library.Update()
$Ctx.ExecuteQuery()
#Delete the Document Library (Send to Recycle bin)
$Library.Recycle() | Out-Null
$Ctx.ExecuteQuery()
Write-Host "Document Library: '$LibraryName' has been Deleted Successfully!" -ForegroundColor Green
}
Catch {
write-host -f Red "Error Deleting Document Library!" $_.Exception.Message
}
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.