Skip to content

spo page remove

Removes a modern page


m365 spo page remove [options]


-n, --name <name>
Name of the page to remove
-u, --webUrl <webUrl>
URL of the site from which the page should be removed
Do not prompt for confirmation before removing the page
-h, --help
output usage information
--query [query]
JMESPath query string. See for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
Runs command with verbose logging
Runs command with debug logging


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 --confirm flag, you will not be prompted for confirmation before the page is actually removed.


Remove a modern page.

m365 spo page remove --name page.aspx --webUrl

Remove a modern page without a confirmation prompt.

m365 spo page remove --name page.aspx --webUrl --confirm