How to Delete Files and Folders in Windows 11
Deleting files and folders in Windows 11 frees up storage space and clears out clutter you no longer need. Windows 11 gives you at least 4 ways to do it, from keyboard shortcuts to menu options and the command line.
You can send an item to the Recycle Bin , where you can still get it back, or delete it permanently so it skips the bin. This guide covers both, plus how to restore deleted items, how to remove stubborn files, and how to let Storage Sense clean up for you. Keeping storage tidy helps your PC run smoothly and leaves room for new apps and updates.
Delete files and folders in Windows 11 by pressing the Delete key, dragging them to the Recycle Bin , or right-clicking and selecting Delete. For permanent deletion, hold Shift while pressing Delete.
What happens when you delete files?
When you delete a file in Windows 11, it usually goes to the Recycle Bin first. The bin is a temporary holding place. The file still takes up disk space while it sits there, and you can restore it until you empty the bin. Files only free up space once they are permanently deleted.
How to move items to the Recycle Bin
Sending items to the Recycle Bin is the safest way to delete files in Windows 11, because you can recover them later if you change your mind. Select the item and press the Delete key, or drag it onto the Recycle Bin icon on your desktop. Both methods are below.
- Click the file or folder once to select it. It should now be highlighted.
- Press the DELETE key on your keyboard. The item disappears from the folder and moves to the Recycle Bin .
- Alternatively, drag the item onto the Recycle Bin icon on your desktop and release the mouse button.
You can select several items at once. Hold the CTRL key while you click each one, or press Ctrl+A to select everything in the folder, then press Del. Deleting a folder sends the folder and everything inside it to the bin as a single item.
File Explorer ’s toolbar also offers a delete option. With the item selected, click the trash can icon in the command bar at the top of the window. The result is the same as pressing Delete. Right-clicking the item also shows a trash can icon in the row of icons in the context menu .

For more choices, right-click the file, select Show more options, and then choose Delete. This opens the classic right-click menu from earlier versions of Windows. You can also press SHIFT + F10 after selecting an item to open that menu straight away.



How to restore deleted items
If you delete something by accident, getting it back takes a few clicks, as long as the Recycle Bin has not been emptied. Open the Recycle Bin from your desktop, select the item, click the three dots in the toolbar, and choose the restore option. The file goes back to the folder it was deleted from. If that folder no longer exists, Windows recreates it.
- Open the Recycle Bin on your desktop. You should see a list of deleted items.
- Select the item you want to get back.
- Click the three dots (ellipsis) in the toolbar.
- Select Restore the selected items. The item leaves the bin and reappears in its original folder.
If the Recycle Bin icon is not on your desktop, you can open it another way. This also works if you prefer the mouse:
- Right-click the Recycle Bin icon on your desktop.
- Select Open.
- Click the file you want to retrieve.
- Click Restore the selected item in the toolbar.
You can also right-click an item inside the bin and choose Restore.
To bring everything back at once, choose Restore all items. With nothing selected, this button appears in the toolbar of the open Recycle Bin.

How to permanently delete files
Permanent deletion skips the Recycle Bin and removes the item from your computer right away. To bypass the bin, select the file or folder, hold down the Shift key, and press Delete. Use this only when you are sure you won't need the item again, because you cannot restore it from the bin afterward.
- Click the file or folder once to select it.
- Hold down the SHIFT key on your keyboard.
- While holding SHIFT, press the DELETE key. A confirmation box should appear.
Read the confirmation box before you click Yes. Once you confirm, the item is gone and the disk space is freed straight away.
Windows asks you to confirm because this action cannot be undone. Some items are deleted permanently even without Shift. Files on USB drives and network locations usually skip the Recycle Bin, and so do files too large for the bin's size limit. In those cases Windows warns you in the confirmation box.

Advanced deletion and locked files
Stubborn files that refuse to delete normally can often be removed with Command Prompt, a text-based tool for running system commands. A command can delete files that File Explorer rejects, for example a file with an unusual name or a read-only file. It cannot remove a file that a running program has open. If you see a message that the file is in use, close the program first, or end it in Task Manager, and try again.
Like Shift + Delete, a file deleted this way does not go to the Recycle Bin, so double-check the path before you press Enter. To open an elevated Command Prompt, click Start, type Command Prompt, right-click the result, and select Run as administrator. Approve the User Account Control prompt if it appears.
Run the following command to remove a file. Replace the example path with the real path to your file, and put the path in quotation marks if it contains spaces. If the command succeeds, Command Prompt returns to a new line with no error message, and the file is gone from its folder.
del /f /q "C:\Path\To\File.txt"Storage optimization and automation
Storage Sense is a Windows 11 feature that frees up disk space automatically. It removes temporary files and can empty the Recycle Bin on a schedule, so you don't have to clean up by hand. You can find it under Settings System Storage. Switch it on there, and open its settings to choose how often it runs and how long items stay in the Recycle Bin before they are deleted for good. Keep in mind that once Storage Sense empties the bin, those files can no longer be restored. If you want a longer safety window, pick a longer time limit, or turn the option off.
Summary
Managing storage in Windows 11 comes down to knowing how to delete files. Use the Recycle Bin when you want a safety net, and use Shift + Delete when you are sure the item is no longer needed. Restore anything you removed by mistake before the bin is emptied, and let Storage Sense handle routine cleanup.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
I try to delete folder than under users, I got message: “This action can’t be completed because the folder or a file in it is open in another program. Close the folder or file and try again.”
this folder is created by windows 11 and name is “defaultuser0”.
My question is: How to close this folder and file?
[…] the Microsoft Windows operating system. A graphical user interface lets you view, copy, move, delete, and rename files and folders and organize them […]
[…] you accidentally delete a file or folder in OneDrive, you may be able to recover it later from the OneDrive recycle bin. First, […]
[…] in the Microsoft Windows operating system. A graphical user interface lets you view, copy, move, delete, and rename files and folders and organize them in a hierarchical […]
[…] Microsoft Windows operating system. A graphical user interface lets you view, copy, move, delete, and rename files and folders and organize them […]
[…] you delete files or folders, the data isn’t initially removed from the hard disk. Instead, the space on the disk occupied […]
[…] You can delete files and folders: How to delete files and folders […]
[…] Tip: If you want to learn more about deleting files the usual way, check out this easy guide: How to Delete Files and Folders in Windows 11. […]