PowerShell: Delete Directory

By Xah Lee. Date: .

Delete Directory

# delete a dir
rm .\dirName
# PowerShell may prompt to confirm
# delete a directory, force, no ask
rm .\dirName -Force -Recurse

If you cannot delete a dir because read only etc, see PowerShell: Show File Attributes

PowerShell, Working with Directory