You can delete all files in a folder by selecting them together, but the method depends on what you're deleting and where
The fastest way to delete everything in a folder is to select all files at once, then send them to trash or permanently remove them. On Windows, open the folder, press Ctrl+A to select all, then press Delete. On Mac, use Command+A then press Command+Delete. Both methods move files to trash first, so you can recover them if you change your mind. If you want to skip trash and delete permanently on Windows, select all files, then press Shift+Delete instead.
Before you delete everything in a folder, make sure you actually want to delete everything. Deleting all files at once is fast, but recovering them afterward is harder than recovering a single file. If the folder contains anything you might need later — old documents, photos, or work files — move those items to a backup location first, or consider whether you really need to clear the whole folder.
Key Takeaways
- Select all files in a folder with Ctrl+A (Windows) or Command+A (Mac), then press Delete to move them to trash.
- Use Shift+Delete on Windows to skip trash and delete permanently, which cannot be undone.
- On Mac, files deleted with Command+Delete go to Trash and can be recovered for several weeks until Trash empties automatically.
- Deleting an entire folder removes everything inside it, so double-check the folder contents before you select all.
- If you want to keep some files, select only the ones you need to remove instead of using select all.
Selecting all files without selecting subfolders
When you press Ctrl+A or Command+A in a folder, the system selects every file and every subfolder inside it. If you have folders nested inside the main folder, deleting all will remove those folders and everything in them too. This is usually what you want, but if you need to keep some subfolders, you have to select files differently.
To select only the files in the current folder and not the subfolders, click the first file, hold Shift, and click the last file. This selects everything between them in a single row. If your files are not in a single row — for example, if folders are mixed in — you can click individual files while holding Ctrl (Windows) or Command (Mac) to add them to your selection one at a time. This takes longer but gives you complete control over what gets deleted.
Deleting files from your desktop
Your desktop is actually a folder on your computer, so the same delete methods work there. Select the files or folders you want to remove, press Delete, and they move to trash. On Windows, you can also right-click any file on your desktop and choose "Delete" from the menu. On Mac, right-click and select "Move to Trash."
Deleting files from your desktop does not free up much storage space, because the desktop is usually just a view into a folder on your hard drive — the files still take up the same amount of room until you empty trash. However, clearing your desktop does make it easier to find things and can make your computer feel less cluttered when you start it up.
Emptying trash after you delete
On Windows, deleted files sit in the Recycle Bin until you empty it. Right-click the Recycle Bin icon on your desktop and select "Empty Recycle Bin." On Mac, deleted files sit in Trash, which you can empty by right-clicking the Trash icon in the dock and selecting "Empty Trash." Once you empty trash or Recycle Bin, the files are much harder to recover, though specialized recovery software can sometimes retrieve them if you act quickly.
You do not have to empty trash right away. Leaving files in trash for a few days or weeks gives you time to make sure you did not delete something by mistake. If you realize you need a file back, you can open trash or Recycle Bin, find the file, and restore it to its original location.
Deleting files from external drives and USB sticks
When you delete files from an external hard drive or USB stick, they may not go to your computer's trash. Instead, they are often deleted when ready and permanently. Before you delete all files from an external drive, make sure you have a backup of anything you might need, because recovery is much harder than recovering files from your main hard drive.
To delete files from an external drive safely, connect it to your computer, open the drive in your file manager, select the files you want to remove, and press Delete. If the files do not appear in your trash, they were deleted directly from the external drive. Some external drives have their own trash or recycle system, so check the drive's manual or settings if you want to know whether deleted files can be recovered.
What to do if you cannot delete a file
Sometimes you try to delete a file and get an error message saying the file is in use or you do not have permission to delete it. On Windows, this usually means a program has the file open. Close the program completely, then try deleting again. On Mac, you may see a message that you do not have permission; try right-clicking the file, selecting "Get Info," and checking the permissions at the bottom of the window.
If a file is locked or protected, you may need to unlock it before deletion. On Windows, right-click the file, select "Properties," and uncheck "Read-only" if it is checked. On Mac, right-click the file, select "Get Info," and uncheck "Locked." After you unlock it, try deleting again. If you still cannot delete a file, restart your computer and try once more — this closes any programs that might be holding the file open.
Clearing out old downloads and temporary files
Your Downloads folder and temporary file locations often fill up with files you no longer need. To clear your Downloads folder, open it, select all files with Ctrl+A or Command+A, and delete them. Most files in Downloads are safe to delete once you have installed or used what you needed from them.
Temporary files live in different places depending on your operating system. On Windows, temporary files are usually in C:\Users\[Your Username]\AppData\Local\Temp. On Mac, they are in /Library/Caches and /var/tmp. You can delete most files in these folders safely, though some programs may need to recreate them. If you are not sure whether a temporary file is safe to delete, leave it alone — deleting the wrong temporary file can cause a program to crash or behave strangely.
Frequently Asked Questions
Can I undo a delete if I already emptied the trash?
Once you empty trash or Recycle Bin, undoing is not possible through normal methods. However, if you have a backup of your files — from an external drive, cloud storage, or a backup program — you can restore them from there. Some recovery software can retrieve permanently deleted files, but success is not may provide and depends on how long ago you deleted them and what you have done with your drive since.
Does deleting files actually free up space on my computer?
Deleting files frees up space only after you empty trash or Recycle Bin. Until then, the files still take up room on your hard drive. Once trash is empty, the space becomes available for new files. If you are trying to free up space quickly, delete files and then empty trash when ready.
What happens if I delete a folder by mistake?
If you deleted a folder, everything inside it was deleted too. Open your trash or Recycle Bin, find the folder, right-click it, and select "Restore" or "Put Back." The folder and all its contents will return to their original location. If you already emptied trash, recovery is much harder.
Can I delete files from my cloud storage the same way?
Cloud storage services like OneDrive, Google Drive, and iCloud work differently than local folders. When you delete a file from cloud storage, it usually goes to a trash or recycle bin within that service, not your computer's trash. You can recover it from the cloud service's trash for a limited time — usually 30 days — before it is permanently removed.
Is it safe to delete system files from my Windows or Mac computer?
No. System files are files your operating system needs to run. Deleting them can break your computer or make it unable to start. System files are usually hidden by default and located in folders like System32 (Windows) or /System (Mac). If you see a file in one of these folders, do not delete it unless you are absolutely certain what it does.