The basic way to delete a folder
To delete a folder, right-click it and select Delete (Windows) or Move to Trash (Mac). On Linux, right-click and choose Move to Trash or Delete depending on your file manager. The folder and everything inside it will move to your Recycle Bin, Trash, or equivalent temporary storage — you can still recover it from there if you change your mind.
If the folder is empty, deletion happens instantly. If it contains files or subfolders, your system will ask you to confirm before proceeding. This confirmation step protects you from accidentally erasing something you need.
On any system, you can also select a folder and press the Delete key on your keyboard. The result is the same: the folder moves to temporary storage rather than disappearing permanently.
Key Takeaways
- Right-click a folder and select Delete or Move to Trash to send it to temporary storage where you can recover it later.
- Deleting a folder removes everything inside it at once, so confirm the action if your system asks.
- Permanently erasing a folder requires emptying your Recycle Bin or Trash afterward; simply deleting it leaves recovery possible for days or weeks.
- Some folders are protected by your system and cannot be deleted without administrator permission, which prevents accidental damage to core files.
- If a folder is locked or in use by a running program, you may need to close that program or restart your computer before deletion works.
What happens when you delete a folder
When you delete a folder, your system does not immediately erase it from your hard drive. Instead, it moves the folder to a temporary holding area. On Windows, this is the Recycle Bin. On Mac, it is the Trash. On Linux, most file managers send deleted items to a Trash folder, though some systems vary.
The folder stays in this temporary storage until you empty it. This means you can recover a deleted folder by opening your Recycle Bin or Trash, finding the folder, and selecting Restore or dragging it back to its original location. Recovery is usually possible for days or weeks, depending on how much new data you store on your computer.
Once you empty the Recycle Bin or Trash, recovery becomes much harder. The folder's location on your drive is marked as available for new data, but the data itself may still exist until your system overwrites it. Specialized recovery software can sometimes retrieve permanently deleted folders, but this is not may provide and becomes less likely the more you use your computer afterward.
Deleting folders you do not own or cannot access
Some folders are protected by your system or owned by another user account. If you try to delete a protected folder, you will see a message saying you do not have permission. On Windows, this message reads "You need permission to perform this action." On Mac, it says "The item [folder name] cannot be moved to the Trash because you do not have permission."
To delete a protected folder on Windows, right-click it, select Delete, and then click Continue when prompted for administrator permission. Your system may ask you to enter your password. On Mac, you cannot delete a folder you do not own unless you change its permissions first — this requires opening Get Info, clicking the lock icon, and adjusting the Sharing & Permissions settings.
On Linux, use the terminal command rm -r foldername to delete a folder and its contents, but only if you have write permission in that directory. If you do not, you may need to use sudo (which requires your password) or ask a system administrator for help.
Folders that are locked or in use
If a folder is currently open in a program or being used by a running process, your system may refuse to delete it. You will see an error message like "The folder is in use" or "The action cannot be completed because the file is open in another program." This is a safety feature that prevents data loss.
To delete a locked folder, close the program using it first. If you are not sure which program has the folder open, restart your computer — this closes all running programs and releases any locks. After restart, the folder should delete normally.
On Windows, if a file inside the folder is locked, you can sometimes delete the folder anyway and leave the locked file behind. On Mac and Linux, the entire folder operation usually fails if any file inside is locked. In these cases, closing the program or restarting is the most reliable solution.
Permanently erasing a folder so it cannot be recovered
If you want to make sure a deleted folder cannot be recovered, you must empty your Recycle Bin or Trash after deleting it. On Windows, right-click the Recycle Bin icon on your desktop and select Empty Recycle Bin. On Mac, open the Trash, click Empty in the top menu, and confirm. On Linux, right-click the Trash icon in your file manager and select Empty Trash.
Emptying the Recycle Bin or Trash marks the folder's space as available for new data, making recovery much harder. However, the data may still exist on your drive until your system writes new files over that space. If you need to ensure a folder cannot be recovered under any circumstances — for example, because it contains sensitive personal information — you can use disk-wiping software that overwrites the space multiple times. Programs like DBAN (Darik's Boot and Nuke) on Windows or Secure Empty Trash on Mac perform this kind of thorough erasure.
For most everyday use, simply emptying the Recycle Bin or Trash is enough. Recovery software exists, but it requires technical knowledge and does not work on all systems or all types of data.
Deleting folders from external drives and cloud storage
Deleting a folder from an external hard drive, USB stick, or SD card works the same way as deleting from your main computer — right-click and select Delete or Move to Trash. However, recovery is sometimes different. Some external drives do not have a Recycle Bin or Trash; they delete folders immediately. Check your external drive's behavior by deleting a test folder first, or look in your file manager to see if a Trash folder appears.
Cloud storage services like Google Drive, Dropbox, and OneDrive handle deletion differently. When you delete a folder from a cloud service, it moves to a Trash or Bin folder within that service. You can recover it from there for a set period — usually 30 days for Google Drive, 30 days for Dropbox, and 93 days for OneDrive. After that period, the folder is permanently deleted from the cloud service's servers.
Deleting a folder from cloud storage does not immediately free up space on your computer if you have the service synced to your local drive. The folder may remain on your computer until you manually delete it there as well, or until your sync settings update. Check your cloud service's settings to understand how deletion works on your account.
Troubleshooting when a folder will not delete
If a folder refuses to delete, the most common causes are: the folder is in use by a running program, you do not have permission to delete it, the folder name contains special characters your system does not recognize, or a file inside the folder is corrupted. Start by closing all programs and restarting your computer. This solves the "in use" problem and clears any temporary locks.
If the folder still will not delete after restart, check your permissions. On Windows, right-click the folder, select Properties, go to the Security tab, and verify that your user account has Full Control or Modify permissions. On Mac, open Get Info, check Sharing & Permissions, and make sure your account is listed as Read & Write. If permissions look correct but deletion still fails, try renaming the folder to something simple (like "temp") and then deleting it — sometimes special characters in folder names cause problems.
On Windows, if a file inside the folder is corrupted or has a name your system cannot process, you may need to delete the folder's contents one by one instead of deleting the whole folder at once. Open the folder, select all files inside with Ctrl+A, and delete them. Then delete the now-empty folder. If this still fails, a restart in Safe Mode (where Windows loads only essential drivers) sometimes allows deletion of stubborn files.
Frequently Asked Questions
Can I recover a folder after I empty the Recycle Bin?
Recovery becomes much harder but may still be possible with specialized software. The folder's data remains on your drive until new files overwrite it, which can take weeks or months depending on how much you use your computer. The longer you wait, the less likely recovery becomes. For everyday files, recovery software has a reasonable chance of success within days of deletion.
What is the difference between deleting and moving to trash?
There is no difference — they are the same action with different names on different systems. "Delete" on Windows and "Move to Trash" on Mac and Linux both send the folder to temporary storage. The folder is not permanently erased until you empty the Recycle Bin or Trash afterward.
Why does my system say I need administrator permission to delete a folder?
Your system protects certain folders because they belong to the system itself or another user account. This prevents accidental deletion of files your computer needs to run. If the folder is yours and you still cannot delete it, you may need to change its permissions or restart your computer in Safe Mode on Windows.
Can I delete a folder that contains thousands of files?
Yes, your system will delete the entire folder and all its contents at once. The deletion may take a few seconds or minutes depending on how many files are inside, but you do not need to delete files one by one. If deletion seems to hang, wait a minute before assuming it has failed.
Does deleting a folder free up space on my computer?
Not immediately. The space is marked as available for new data, but the folder still occupies that space until you empty the Recycle Bin or Trash. Only after emptying does your system show the space as free, though the data may remain on your drive until new files overwrite it.