Skip to content

spo listitem remove

Removes the specified list item

Usage

spo listitem remove [options]

Options

Option Description
--help output usage information
-u, --webUrl <webUrl> URL of the site where the list to remove is located
-i, --id <id> The ID of the list item to remove.
-l, --listId [listId] List id of the list to remove. Specify either listId or listTitle but not both
-t, --listTitle [listTitle] Title of the list to remove. Specify either listId or listTitle but not both
--recycle Recycle the list item
--confirm Don't prompt for confirming removing the list item
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

Before using this command, log in to a SharePoint Online site, using the spo login command.

Remarks

To remove a list item, you have to first log in to a SharePoint Online site using the spo login command, eg. spo login https://contoso.sharepoint.com.

Examples

Remove the list item with ID 1 from list with ID 0cd891ef-afce-4e55-b836-fce03286cccf located in site https://contoso.sharepoint.com/sites/project-x

spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listId 0cd891ef-afce-4e55-b836-fce03286cccf -id 1

Remove the list item with ID 1 from list with title List 1 located in site https://contoso.sharepoint.com/sites/project-x

spo listitem remove --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'List 1' --id 1