56866891328
academy
Security
Privacy
Performance
English

How to Permanently Delete Files on PC

When you delete data on Windows, how can you be confident that the file is permanently deleted? We’ll show you the different ways to completely wipe unwanted files and how to ensure that nobody can recover them. Then, use Cleanup to help automatically delete junk files and bloatware that take up valuable space, improving your computer's performance.

academy-permanently-delete-files-hero
Written by

Updated on November 08, 2026
This Article Contains
This Article Contains

    How to permanently delete files on Windows

    There are several ways to delete files on Windows, but some methods are more permanent than others. If you simply want to free up PC disk space, standard deletion may be sufficient.

    But permanently deleting a file doesn't necessarily make its data unrecoverable — if you’re selling or disposing of your PC, you’ll want to make sure your personal files can't be reconstructed.

    The methods below explain how to permanently delete files using Windows' built-in features. If you need to prevent recovery entirely, jump ahead to our section on securely erasing files and making deleted data unrecoverable.

    Use the right-click menu (Recycle Bin)

    This method sends files to the Recycle Bin, where you can later restore them or delete them permanently. This is an easy option, especially if your keyboard isn’t working and you can’t use Command Prompt or other keyboard shortcuts to delete files.

    Here’s how to do it on Windows 10 and 11:

    1. Right-click the file or folder you want to send to the Recycle Bin and click Delete.

      Windows File Explorer right-click menu open with the Delete option highlighted for removing a file

    2. Open the Recycle Bin, right-click the file, and then select Delete > Yes.

      Windows File Explorer right-click menu open with the Delete option highlighted.

    If you change your mind after sending a file to the Recycle Bin, you can select Restore to send it back to its original location, or drag it to any folder on your desktop. Once the Recycle Bin is emptied, Windows considers the file permanently deleted. However, the underlying data may still be recoverable using specialized software.

    Use the keyboard shortcut: Shift + Delete

    The Shift + Delete keyboard shortcut removes a file immediately without sending it to the Recycle Bin. After you confirm the deletion, Windows deletes the file from your file system. This method is also useful if your mouse is not working.

    Here’s how to do it:

    1. Press and hold the Windows + E keys to open File Explorer.

    2. Hit Tab until the cursor moves to the search box, type the name of the file, and hit Enter.

    3. Use the arrow keys to select the file you want to delete.

    4. Press and hold Shift + Delete (or Shift + Supr on some keyboards).

    5. Select Yes if Windows asks you to confirm the deletion.

    Windows File Explorer showing a file selected and a permanent delete confirmation dialog with Yes highlighted.Deleting a file in this manner may not work if the file is still in use by a program when you try to delete it, or if you’re not authorized to delete the file.

    Use the File Explorer Ribbon

    In Windows 10, you can permanently delete selected files via the File Explorer Ribbon. This toolbar, located at the top of File Explorer, contains tabs and commands for managing files and folders, including options for deleting them.

    Here’s how to use it to delete files or folders in any location by following these steps:

    1. Open File Explorer by pressing Windows + E or clicking the folder icon on the Windows taskbar.

      File Explorer icon selected on the Windows taskbar.

    2. Navigate to the folder where the file you want to delete is located.

    3. Select the file and click the Home tab in the ribbon toolbar.

    4. Find the Delete option, open the drop-down menu, select Permanently delete, and click Yes when prompted.

      Permanently Delete selected in the File Explorer Home tab ribbon toolbar.

    Note that if the File Explorer Ribbon is not appearing at the top of the window, hold the Ctrl + F1 keys simultaneously to toggle its visibility.

    In Windows 11, Microsoft replaced the File Explorer Ribbon with a more compact command bar that contains the most commonly used actions. To permanently delete a file, select it, then hold Shift while clicking Delete on the command bar.

    Windows 11 File Explorer with the Delete option on the command bar highlighted.

    Use PowerShell

    Advanced users can use PowerShell, Windows' command-line shell and scripting tool, to delete files directly without sending them to the Recycle Bin. PowerShell also lets you automate file management and other system tasks, although deleted data may still be recoverable.

    Here’s how to delete files permanently using PowerShell:

    1. Type PowerShell into the search bar and press Enter.

      PowerShell text displayed in the Windows taskbar

    2. To permanently delete a file, enter the Remove-Item cmdlet followed by the -Path parameter and the file’s full path (e.g., Remove-Item -Path “[full path of the file]”), and then press Enter.

      Windows PowerShell window showing a command to delete a single file.

    3. To permanently delete a folder and all its contents, add the -Recurse parameter to the command: Remove-Item -Path “[full path of the folder]” -Recurse.

    How to make deleted files unrecoverable

    To permanently delete files and help prevent data recovery, you can use specialized built-in and third-party data-wiping tools, also known as file shredders. Unlike standard deletion, which permanently removes a file's reference from the file system but may leave its data intact, these tools overwrite or erase the underlying data. However, their effectiveness depends on the type of storage drive you’re dealing with.

    Use a secure file shredder tool

    When you delete a file in Windows, the operating system removes its reference from the file system, but the underlying data may remain on your drive until it's overwritten or erased. This means dedicated recovery software may still be able to retrieve previously deleted files, depending on your storage device and system activity.

    To help make sure that your files are irreversibly erased at the click of a button, consider using a specialized file shredder tool that deletes and immediately overwrites the file data on your hard drive, rather than simply removing its reference.

    Avast Cleanup includes a built-in data shredder that helps you permanently delete files, securely overwrite data, and free up space on your drive.

    Windows Cipher Command

    Cipher is a built-in command-line tool that overwrites the free space on a drive multiple times, helping prevent the recovery of previously deleted files. Unlike a file shredder, it doesn't delete existing files or overwrite data still stored in the Recycle Bin, so be sure to empty the Recycle Bin first.

    But because Cipher overwrites all available free space on the selected drive, not just the space previously occupied by a particular file, the process can take a considerable amount of time, depending on the drive's capacity and performance. If you need to securely delete a specific file, a tool such as SDelete may be more appropriate for traditional hard drives.

    Cipher's free-space wiping feature is only intended for NTFS volumes, so avoid using it on solid-state drives (SSDs). Repeated overwriting causes unnecessary wear and may not reliably erase data because of SSD wear-leveling and storage management.

    To permanently erase already-deleted files with Cipher Command:

    1. If you haven’t already, send the file to the Recycle Bin and empty the Bin.

    2. Type cmd in the Start Menu search bar, right-click Command Prompt, and select Run as administrator.

      Windows Start menu search results showing Command Prompt selected with the "Run as administrator" option highlighted.

    3. Type the command cipher /w:C:\ (replace C: with the drive where the deleted file was stored) and press Enter.

      Command Prompt window in Windows 11 showing the cipher command entered in the console input line.

    SDelete

    SDelete (also called SecureDelete) is a command-line utility from Microsoft's Sysinternals suite that irreversibly deletes files by overwriting their data. It's primarily suited to traditional hard disk drives, as overwriting files on solid-state drives may not reliably erase all copies of the data.

    SDelete allows you to delete one or more files and/or directories, or to wipe the free space on a logical disk.

    Here’s how to use the SDelete program to overwrite deleted file locations immediately:

    1. Download SDelete from Microsoft and extract the contents of the zip folder.

    2. Type cmd into the search bar to open Command Prompt and click Run as an administrator.

    3. Run the following command, replacing the file path with the file you want to securely delete and overwrite: C:\Path\to\SDelete\sdelete.exe” -p 5 “C:\path\to\file.ext

    Command Prompt showing SDelete syntax with the overwrite count set to 5 passes.Note that the -p [number] portion of the command lets you specify the number of times the physical storage location gets overwritten with random patterns, with more overwrites making data recovery more difficult. In the example above, we used the number 5, meaning the data was overwritten 5 times. For most modern drives, a single pass (-p 1) is sufficient.

    Can deleted files be recovered?

    Deleted files are not normally accessible or usable, but they can sometimes be recovered with specialized software, even after you've emptied the Recycle Bin. Standard deletion typically removes a file's reference from the file system, but the underlying data may remain on your drive until it's overwritten or erased.

    On hard disks, recovery tools like Recuva or TestDisk may be able to restore deleted files, even months later. On solid-state drives, recovery is generally less reliable because the TRIM command and garbage collection process can make deleted data inaccessible.

    While recovery can be useful if you accidentally delete something important, it also creates a potential privacy and security risk. Sensitive files, including temporary files containing passwords, financial records, or personal information, could be recovered by someone with access to your drive and used to commit identity theft.

    So if you're selling, donating, or disposing of your computer, standard deletion may not be enough to protect your information. Use secure deletion tools to make sure all files are permanently deleted and the data is wiped from your drive.

    What happens when you delete a file on Windows?

    When you delete a file on Windows, it goes to the Recycle Bin, where you can restore it or delete it permanently. Emptying the Recycle Bin or using Shift + Delete removes the file's reference from the file system, but doesn't necessarily erase the underlying data immediately.

    What happens next depends on your storage drive. To check which type of drive you have: Press Windows + R, type dfrgui, and press Enter. In the Optimize Drives window, check the Media type column to see whether your drive is listed as a hard disk drive or solid-state drive.

    Let’s take a closer look at the differences between what happens when you delete data from SSDs and HDDs.

    Hard disk drive (HDD)

    When you save a file to a hard disk drive (HDD), Windows stores its data in allocated clusters on the disk. Deleting the file removes its reference from the file system and marks the space it occupied as available for reuse. However, the underlying data remains on the drive until it's overwritten by new information.

    There's no way to predict exactly when this will happen. Depending on how you use your computer, deleted data could remain recoverable for months. Until it's overwritten, specialized data-recovery software may be able to restore some or all of the file.

    Solid-state drive (SSD)

    Solid-state drives (SSDs) store data using NAND flash memory cells rather than on spinning disks. They use a technique called wear leveling to distribute write operations across memory cells, helping extend the drive's lifespan.

    When you delete a file stored on an SSD, Windows marks its storage space as available. It can then send a TRIM command to tell the SSD which data is no longer needed. Unlike HDDs, which generally retain deleted data until it's overwritten, SSDs can proactively erase unused data.

    Because SSDs erase data in blocks, the drive may first move any valid data to another location before clearing a block through a process called garbage collection. Once the deleted data has been erased, it generally cannot be recovered using conventional recovery software. This is why recovering deleted files from SSDs is often more difficult than from HDDs.

    Permanently delete files with Avast Cleanup

    Deleting files, especially temporary files and unwanted programs, can be time-consuming. Avast Cleanup helps optimize your PC’s performance by removing bloatware and other unwanted programs, deleting temporary and unnecessary files that slow your system down, putting unused apps to sleep, and keeping your software up to date. Try it for free today.

    More Performance Articles

    How to Clear the Instagram Cache on Your Device

    The Applications Folder on Mac: How to Find and Access Your Apps

    How to Clear System Data or “Other” Storage from Your iPhone

    How to Fix Corrupted Files on Windows Using SFC And DISM

    How to Lower CPU Usage on Windows

    How to Fix the Blue Screen of Death (BSOD) on Windows 10 and 11

    How to Clean Your Computer Screen Without Damaging It

    How to Clear Cache in Chrome and Other Browsers

    How to Screen Record on Your Mac or Macbook (With or Without Audio)

    How to Delete Cache and Cookies on Your iPhone

    How to Clear the Cache on Your Mac

    Android Safe Mode: How to Turn On & Disable Safe Mode on Your Phone

    Images on this page marked with an icon contain AI modified or generated content.

    Delete junk files on your Android automatically with free Cleanup

    Protect your iPhone from threats with free Avast One Mobile

    Avast One
    Mobile

    Free install
    Cleaning
    Performance
    Anthony Freda
    8-10-2021