PowerShell

Remove-Item

DestructiveRemove (PS)

Remove-Item <path> -Recurse -Force

Deletes files/folders; -Recurse incl. contents, -Force forces.

Examples

  • Remove-Item .\temp -Recurse -ForceDelete a folder tree

Syntax

Remove-Item <path> [-Recurse] [-Force]

Before you run it

-Recurse -Force is an irreversible bulk delete.

Related commands

Check it once more before you run it

Some commands cannot be undone if one flag is wrong. An on-device reference works with no connection. Free to install, no ads.

Get it free on the App Store