> ## Content Index
> Fetch the complete content index at: https://www.filipkonopik.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# PowerShell: Remove a Folder
- URL: https://www.filipkonopik.com/powershell-remove-a-folder/
- Published: 2026-07-20T10:46:04.000Z
- Updated: 2026-08-06T05:28:27.000Z
- Author: Filip Konopík
- Tags: Files & Folders

Need to delete a folder - cleaning up a temp directory, removing a leftover from a script, or tearing down a test setup? This one-liner removes it directly from the terminal.

Prerequisites:

- Privileges: None
- Module: Built-in, no import needed

Quick Command:

```Powershell
Remove-Item -Path "C:\NewFolder"
```

📦

****Want all of them at once?**  
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

[Get the Complete Bundle for $39](https://gum.co/u/oczvkqdc?ref=filipkonopik.com)

How It Works:

- Remove-Item deletes the item at the specified path - it works on files and folders alike.
- \-Path "C:\\NewFolder" points to the folder you want to delete - replace this with whatever path you actually want to remove.
- If the folder contains files or subfolders, this fails by default and asks for confirmation.

Pro Tip:

To delete a folder along with all its contents in one go, without confirmation prompts:

```Powershell
Remove-Item -Path "C:\NewFolder" -Recurse -Force
```