spo contenttype remove
Deletes site content type
Usage
m365 spo contenttype remove [options]
Options
-u, --webUrl <webUrl>
Absolute URL of the site where the content type is located.
-i, --id [id]
The ID of the content type to remove. Specify either
id
orname
.-n, --name [name]
The name of the content type to remove. Specify either
id
orname
.-f, --force
Don't prompt for confirming removal of the content type.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
If the specified content type is in use by a list and cannot be removed, you will be returned the error: Another site or list is still using this content type. SharePoint will not allow a content type to be removed unless any dependent objects are also emptied from the recycle bin including the second-stage recycle bin.
The content type you wish to remove can be selected by the ID or Name of the content type. Either ID or Name parameter must be specified.
Examples
Remove a site content type by ID
m365 spo contenttype remove --id "0x01007926A45D687BA842B947286090B8F67D" --webUrl https://contoso.sharepoint.com
Remove a site content type by Name
m365 spo contenttype remove --name "My Content Type" --webUrl https://contoso.sharepoint.com --force
Remove a site content type without prompting for confirmation
m365 spo contenttype remove --name "My Content Type" --webUrl https://contoso.sharepoint.com --force
Response
The command won't return a response on success.