You can easily delete a folder on Windows by selecting it and pressing the Del key or by right-clicking the folder and selecting Delete. If you don’t want your deleted folder to stay in the Recycle bin for 30 days, you can also press Shift + Del key to permanently delete the folder.
However, sometimes you won’t be able to delete a folder by conventional means, and it can show errors like “folder in use,” or “You’ll require admin permission…” In such cases, you will need to force delete the folder using Command-line-interfaces or through a variety of other ways.
Using Command Prompt
you’re able to pretty easily force delete a folder by running therd /s /qcommand on theCommand prompt. The/sand/qparameters will forcefully delete the intended folder and all of its subfolders without a confirmation prompt.
If you’re able to’t delete a folder because it says “could not find this item…,” it is likely that the folder or one of its subfolders contains invalid trailing characters. In such cases, you can add the\?\syntax to the full path in the command.
This will use the long device path of the folder and force delete it.
For example,rd /s /q “\?\C:\Windows Backup\Old Backups "
Using PowerShell
You can also force delete a folder from the PowerShell command-line interface. It is pretty similar to using Command Prompt, and you’ll be using theremove-itemcmdlet with the-recurseand-forceparameters.
The-recurseparameter deletes a folder without prompt confirmation, and the-forceparameter will forcefully delete the folder.
Take Ownership of the Folder
Sometimes, even with administrator access, you might not be able to delete a folder. This usually happens when the folder is not owned by you—the system admin. Most of the time, they are the system folders.
However, as the system administrator, you can forcefully take ownership of that folder. Then, you can simply delete the folder.
Delete Folders in Safe Mode
You won’t be able to delete a folder by conventional means if the folder is in use by an application or service. You can look for which application is using that folder, and end its process fromTask Manager. Then, you will be able to delete it.
However, if you’re able to’t find which application is using the folder, you might want toboot into Safe mode. This ensures Windows boots in a basic state with no unnecessary applications and services running. Anyway, let’s see how you can do so:
Using Third-Party Software
Lastly, you can use third-party software to forcefully delete folders on Windows. There are some great applications that perform this function like Unlocker, File Assassin, and XL Delete. While you will need to download and install them, these applications make it way simpler to force delete a folder after installation.