Table of Contents

Quick Navigation:

In today's digital age, our hard drives store a vast array of personal, financial, and professional information. From confidential documents and private photographs to sensitive work files, the data we keep on our hard drives is incredibly valuable. However, there are times when we need to erase files from a hard drive, whether to free up space, protect our privacy, or prepare a computer for sale. Simply deleting files is not enough; for data to be truly erased, it must be removed in a way that prevents any possibility of recovery. In this guide we will explore various methods to securely erase files from a hard drive, ensuring your data is completely and irretrievably gone.

Permanently Delete Files from a Hard Drive

File Deletion vs. File Erasure

File Deletion Process:

When you delete a file from your computer, it seems to disappear from view. In reality, it remains there and is not removed from the hard drive. However, the OS simply marks the space that the file occupied as available for new data. This means that while the file is no longer visible in your folders or directories, the data itself remains on the drive until it is overwritten by new files. As a result, deleted files can often be recovered using data recovery software, posing a risk if the data is sensitive or confidential.

How to Recover Deleted Files?

How to Recover Deleted Files?

Data recovery software can help you recover deleted files even the recycle bin has been emptied.

File Erasure vs. Deletion:

File erasure is a more secure method of removing data. Unlike simple deletion, which only removes references to the file, erasure involves overwriting the file's data with random information or patterns. This process ensures that the original data is rendered unreadable and unrecoverable. Erasure methods are crucial when dealing with sensitive information that you want to protect from unauthorized access.

Methods to Erase Files from a Hard Drive

Method 1: Manual Erasure

Simple Deletion

The most basic method of file removal is simply deleting files and emptying the Recycle Bin (Windows) or Trash (macOS). While this method removes the files from view, it does not make them truly unrecoverable. The data still exists on the hard drive until it is overwritten. To perform this method:

  1. Select the File or Folder: Click on the file or folder you want to delete.
    Manual Erasure
  2. Delete the File: Right-click and select "Delete," or drag the file to the Recycle Bin or Trash.
    Manual Erasure
  3. Empty the Recycle Bin or Trash: Right-click on the Recycle Bin (Windows) or Trash (macOS) and select "Empty Recycle Bin" or "Empty Trash."
    Manual Erasure

Using Shift + Delete

To bypass the Recycle Bin and delete files immediately, you can use the Shift + Delete keyboard shortcut. This method removes the file directly from the hard drive, but it still does not overwrite the data:

  1. Select the File or Folder: Click on the file or folder you want to delete.
  2. Press Shift + Delete: Hold down the Shift key and press the Delete key. A confirmation dialog will appear.
  3. Confirm Deletion: Click "Yes" to confirm. The file will be deleted without being sent to the Recycle Bin.
    Manual Erasure

Using Built-in Tools

Windows Disk Cleanup

Windows provides a built-in Disk Cleanup tool that can help you remove unnecessary files and free up space. While Disk Cleanup is not specifically designed for secure file erasure, it can assist in removing temporary files and system files that are no longer needed:

  1. Open Disk Cleanup: Type "Disk Cleanup" into the Start menu search bar and select the tool from the results.
  2. Select Drive: Choose the drive you want to clean and click "OK."
  3. Select Files to Delete: Check the types of files you want to remove, such as temporary files, system cache, or Recycle Bin.
  4. Run Cleanup: Click "OK" and then "Delete Files" or "Clean up xx files" to start the cleanup process.
    Windows cleanup

macOS Disk Utility

On macOS, Disk Utility can be used to erase a hard drive, which helps to ensure that deleted files are overwritten:

  1. Open Disk Utility: Go to Applications > Utilities > Disk Utility.
  2. Select Drive: Choose the drive you want to clean from the sidebar.
  3. Erase Free Space: Click on the "Erase" tab and then select "Security Options" to choose the level of erasure. The more secure the option, the more passes the tool will make over the disk space.

    erase hard drive

  4. Run Erase: Click "Erase" to start the process.

Method Method 2: Format the Hard Drive

For Windows:

  1. Open Disk Management: Right-click the Start menu and select "Disk Management."
  2. Select the Drive: Locate and right-click the drive you want to format.
  3. Choose Format: Click "Format."
    Format the Hard Drive
  4. Select Options: Choose the file system (e.g., NTFS) and decide between Quick Format or Full Format.
  5. Format: Click "OK" to start the formatting process.

For macOS:

  1. Open Disk Utility: Go to Applications > Utilities > Disk Utility.
  2. Select the Drive: Choose the drive you want to format from the sidebar.
  3. Erase the Drive: Click "Erase."

    erase hard drive on Mac

  4. Select Format: Choose a format (e.g., APFS) and provide a name.
  5. Erase: Click "Erase" to begin the process.

Method Method 3: Delete Hard Drive Files Using CMD (Command Prompt)

  1. Open CMD: Press Windows Key + R, type cmd, and press Enter.
    Delete Hard Drive Files Using CMD
  2. Navigate to Directory: Use cd to change to the directory with the files:

    cd path\to\directory

    Delete Files: Use del to remove files:

    del filename.ext

    For multiple files, use wildcards:

    del *.txt

    To delete directories, use:

    rd /s /q foldername

Method Method 4: Try PowerShell to Delete Files

  1. Open PowerShell: Press Windows Key + X and select "Windows PowerShell" or "Windows Terminal."
    Try PowerShell to Delete Files
  2. Navigate to Directory: Use Set-Location to change to the directory:
    Set-Location -Path "C:\path\to\directory"
  3. Delete Files: Use Remove-Item to delete files:

    Remove-Item -Path "filename.ext"

    For multiple files, use wildcards:

    Remove-Item -Path "*.txt"

    To delete directories, use:

    Remove-Item -Path "foldername" -Recurse

    Try PowerShell to Delete Files

Permanently Deleted Files from a Hard Drive with Data Erasure Software

For a more thorough approach to file erasure, specialized data erasure software is highly recommended. These tools are designed to overwrite files with random data, ensuring that the original content is completely destroyed:

Overview of Software Options:

  • DoYourData Super Eraser: One of the best data erasure programs that can shred files, wipe hard drive, wipe free disk space, etc. Once the data is erased by DoYourData Super Eraser, the data is lost for good, cannot be recovered by any method.
  • Eraser: A free tool for Windows that allows you to securely delete individual files, folders, or entire drives. Eraser offers various algorithms for overwriting data, including options for multiple passes.
  • CCleaner: Known for its system cleaning capabilities, CCleaner also includes a secure file deletion feature. You can configure it to overwrite files with different levels of thoroughness.
  • DBAN (Darik's Boot and Nuke): A popular tool for securely wiping entire drives. DBAN is often used when preparing a computer for sale or disposal.

How to Use Data Erasure Tool to Permanently Delete Files from a Hard Drive:

Step 1. Download the data erasure tool of your choice from its official website and install it on your computer.

Here, you can download and install DoYourData Super Eraser on your Mac and use it to permanently delete files from a hard drive, SSD, USB flash drive, SD card, digital camera, etc.

DoYourData Super Eraser

  • Permanently delete files from a hard drive.
  • Wipe a hard drive to wipe all data from the hard drive.
  • Wipe free disk space to erase already deleted or lost data.

Step 2. Open DoYourData Super Eraser, choose Erase Files/Folders mode, then click Add to select files/folders to erase.

Erase Files/Folders from Hard Drive

Step 3. After selecting the files/folders, click on Erase Now button to securely and permanently erase the selected files/folders.

Erase Files/Folders from Hard Drive

More tips:

  • If you want to permanently erase all data (existing data, deleted/formatted/lost data included) from a hard drive, just choose Wipe Hard Drive mode.
  • If you want to permanently erase all deleted/formatted/lost data from your hard drive, just choose Wipe Free Space.
  • Once the files are erased by DoYourData Super Eraser, the files are lost for good, cannot be recovered by any method.
  • DoYourData Super Eraser offers several data erasure standards including HMG Infosec, NIST 800-88, Peter Gutmann's algorithm, DoD 5220.22-M, U.S. Army AR380-19, etc. You can choose a standard to help you shred files or erase data.

Best Practices for Erasing Files from a Hard Drive

Multiple Passes:

Using multiple overwrite passes is a best practice for secure file erasure. Many data erasure tools offer options to overwrite files multiple times with random data. The more passes used, the more secure the erasure. The U.S. Department of Defense recommends a three-pass method, but more passes can provide greater security.

Verifying Erasure:

After erasing files, it's important to verify that they are truly gone. Use data recovery software to check if any files can still be recovered. If the software fails to find any recoverable data, you can be confident that your files are securely erased.

Regular Maintenance:

Incorporate regular file erasure into your routine to maintain data privacy and security. Set up a schedule to review and securely delete sensitive files, particularly if you work with confidential information. Regular maintenance helps prevent accidental data recovery and keeps your hard drive free of unnecessary files.

Common Pitfalls and How to Avoid Them:

  1. Inadequate Overwriting: A common pitfall in data erasure is insufficient overwriting. Ensure that you use reliable tools that offer multiple overwrite passes to guarantee data is irretrievable. Avoid tools that do not provide a clear method for secure erasure.
  2. Overlooking Backups: Sometimes, backups of deleted files can remain accessible. Before erasing files, review and securely delete backups that may contain sensitive information. Ensure that backups stored on external drives or cloud services are also addressed.
  3. Relying Solely on Deletion: Relying solely on basic file deletion methods is inadequate for secure erasure. Use a combination of methods, including data erasure software and encryption, to ensure that files are completely and irretrievably removed.

Conclusion

Securely erasing files from a hard drive is essential for protecting your privacy and ensuring that sensitive information does not fall into the wrong hands. By understanding the difference between simple deletion and secure erasure, and employing methods such as manual deletion, built-in tools, data erasure software, encryption, and physical destruction, you can effectively remove files from your hard drive. Regular maintenance and careful consideration of the specific type of hard drive you are using will further enhance your data security. Whether you're preparing a computer for sale or simply managing your data privacy, these practices will help you ensure that your files are truly erased and irrecoverable.

DoYourData Super Eraser

DoYourData Super Eraser

DoYourData Super Eraser, the award-winning data erasure software, offers certified data erasure standards including U.S. Army AR380-19, DoD 5220.22-M ECE to help you securely and permanently erase data from PC, Mac, HDD, SSD, USB drive, memory card or other device, make data be lost forever, unrecoverable!

DoYourData Author

Written & Updated by Shirly Chen

Shirly Chen has been writing data recovery, data erasure articles for DoYourData over 4 years. She has been working as a professional website content writer & editor for quite a long time. She also writes articles about disk clone, Mac optimization, disk backup, etc.

Read full bio