Skip to main content

spo page remove

Removes a modern page

Usage

m365 spo page remove [options]

Options

-n, --name <name>

Name of the page to remove.

-u, --webUrl <webUrl>

URL of the site from which the page should be removed.

-f, --force

Do not prompt for confirmation before removing the page.

-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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

If you try to remove a page with that does not exist, you will get a The file does not exist error.

If you set the -f, --force flag, you will not be prompted for confirmation before the page is actually removed.

Examples

Remove a modern page

m365 spo page remove --name page.aspx --webUrl https://contoso.sharepoint.com/sites/a-team

Remove a modern page without a confirmation prompt

m365 spo page remove --name page.aspx --webUrl https://contoso.sharepoint.com/sites/a-team --force

Response

The command won't return a response on success.

CTRL + M