spo listitem remove
Removes the specified list item
Usage
m365 spo listitem remove [options]
Options
-u, --webUrl <webUrl>URL of the site where the list item to remove is located
-i, --id <id>The ID of the list item to remove.
-l, --listId [listId]ID of the list where the item should be removed. Specify either
listTitle,listIdorlistUrl-t, --listTitle [listTitle]Title of the list where the item should be removed. Specify either
listTitle,listIdorlistUrl--listUrl [listUrl]Server- or site-relative URL of the list. Specify either
listTitle,listIdorlistUrl--recycleRecycle the list item
-f, --forceDon't prompt for confirming removing the list item
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,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.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Examples
Remove the list item located in a given site based on the list id
m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf --id 1
Remove the list item located in a given site based on the list title
m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'List 1' --id 1
Remove the list item located in a given site based on the server-relative list url
m365 spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl /sites/project-x/lists/TestList --id 1
Response
The command won't return a response on success.