The basic way to delete a file
On Windows, right-click the file you want to remove and select Delete from the menu. The file moves to the Recycle Bin, a holding area where you can recover it if you change your mind. To permanently remove it, empty the Recycle Bin by right-clicking the Recycle Bin icon on your desktop and selecting Empty Recycle Bin.
On Mac, click the file once to select it, then press Command + Delete, or right-click and choose Move to Trash. The file goes to the Trash folder. To permanently remove it, right-click the Trash icon in your dock and select Empty Trash.
On Linux, the method depends on your desktop environment. In most file managers, right-click the file and select Move to Trash or Delete. Some systems send files to a trash folder; others remove them immediately. Check your file manager's menu under Edit or preferences to see how deletion works on your system.
Key Takeaways
- Files moved to Recycle Bin (Windows) or Trash (Mac) can be recovered until you empty that folder, which is the permanent deletion step.
- Deleting a file does not erase the data from your drive immediately — it only marks the space as available for new files.
- If you need to prevent recovery of sensitive files, use secure deletion software or your operating system's built-in encryption tools before deleting.
- Selecting multiple files at once lets you delete them together: Ctrl+click (Windows) or Command+click (Mac) to select, then delete.
Deleting files in bulk
If you need to remove many files at once, select them together before deleting. On Windows, hold Ctrl and click each file you want to remove, or click the first file, hold Shift, and click the last file to select everything in between. On Mac, hold Command and click each file, or use Command + A to select all files in the current folder.
Once you have selected multiple files, right-click any of them and choose Delete. All selected files move to Recycle Bin or Trash together. This is faster than deleting one file at a time, especially when cleaning out a folder with dozens of items.
Why deleted files can sometimes be recovered
When you delete a file, your operating system removes the reference to it from your file system but does not immediately overwrite the actual data on your drive. The space where that file lived is marked as available, but the data remains until new files are written over it. This is why recovery software can sometimes restore deleted files — the data is still physically present on the drive.
The longer you wait after deletion, the more likely new files will overwrite the old data, making recovery harder or impossible. If you delete a file and immediately realize you need it, stop using your computer and use recovery software right away. The sooner you act, the better your chances.
Permanently removing sensitive files
If you are deleting files that contain passwords, financial information, or other sensitive data, standard deletion is not enough. Use cipher /w:C: on Windows (run as administrator in Command Prompt) to overwrite free space on your C: drive, making recovery much harder. This process takes time but ensures deleted data is less recoverable.
On Mac, use Secure Empty Trash if your Mac is running an older version (this feature was removed in newer macOS versions). For newer Macs, encrypt your drive with FileVault before deleting sensitive files — encryption makes the data unreadable even if someone recovers it from your drive.
For highly sensitive files, consider using dedicated secure deletion software like Eraser (Windows) or Permanent Eraser (Mac). These tools overwrite files multiple times before deletion, making recovery nearly impossible. They are slower than standard deletion but offer stronger protection for documents you absolutely need to remove.
Deleting files from external drives and cloud storage
External hard drives and USB drives work the same way as your main drive — files go to a trash or recycle bin first, then are permanently removed when you empty it. Right-click the file on the external drive and select Delete, then empty the trash. The process is identical to deleting from your computer.
Cloud storage services like Google Drive, OneDrive, and Dropbox have their own trash folders. When you delete a file in these services, it moves to a trash or recycle bin within that service, not your computer's trash. You must empty the cloud service's trash separately to permanently remove the file. Most services keep deleted files in trash for 30 days before removing them automatically.
What happens when you delete a file you still need
If you delete a file by mistake, check your Recycle Bin (Windows) or Trash (Mac) immediately. Right-click the file and select Restore or Put Back to return it to its original location. This works as long as you have not emptied the trash yet.
If you have already emptied the trash, recovery is still possible but requires software. Recuva (Windows) and Data Rescue (Mac) are recovery tools that scan your drive for deleted files and attempt to restore them. Success depends on how much new data has been written to your drive since deletion. The sooner you run recovery software, the better your chances of getting the file back.
Preventing accidental deletion
For important files you do not want to delete by mistake, change the file's properties to make it read-only. On Windows, right-click the file, select Properties, check the Read-only box, and click Apply. On Mac, right-click the file, select Get Info, and check Locked. Read-only files cannot be modified or deleted without removing this protection first, which adds a confirmation step.
Another approach is to keep important files in a separate folder with restricted access. On Windows, right-click the folder, select Properties, go to the Security tab, and adjust permissions so only your account can access it. On Mac, right-click the folder, select Get Info, and set Sharing & Permissions to limit who can open or modify files inside.
Frequently Asked Questions
Can I recover a file after I empty the Recycle Bin?
Yes, but only if the data has not been overwritten. Use recovery software like Recuva (Windows) or Data Rescue (Mac) to scan your drive. The sooner you run the software after emptying the bin, the higher your chances of recovery. If you have been using your computer normally since deletion, new files may have already overwritten the old data, making recovery impossible.
Does deleting a file from cloud storage delete it everywhere?
When you delete a file from Google Drive, OneDrive, or Dropbox, it is removed from all devices synced to that account. The file goes to the service's trash folder, where it stays for 30 days before permanent removal. You can restore it from trash during that window, but once the trash is emptied, recovery depends on whether the service keeps backups.
What is the difference between delete and format?
Deleting removes individual files one at a time. Formatting erases everything on a drive or partition at once and prepares it for new use. Formatting is much faster than deleting thousands of files individually, but it removes all data on that drive. Both operations leave data recoverable until it is overwritten, so use secure deletion tools if you are disposing of a drive containing sensitive information.
Why does my computer say a file is in use and will not delete?
A file cannot be deleted while a program is actively using it. Close the program that has the file open, then try deleting again. If you are unsure which program is using it, restart your computer — this closes all open programs and files. After restart, the file should delete normally.
Is it safe to delete system files?
No. System files are part of your operating system and deleting them can break your computer. Windows and Mac protect system files by default — you cannot delete them without administrator permission. If you see a system file you want to remove, leave it alone. Stick to deleting only files you created or downloaded.