How to Erase a Hard Drive Using DBAN

Run DBAN to erase all the files and folders on a hard drive

What to Know

  • Darik's Boot And Nuke (DBAN) is an entirely free data destruction program used to completely erase all the files on a hard drive.
  • This includes everything—every installed application, all your personal files, and even the operating system.
  • DBAN has to run while the operating system isn't in use so you'll need to burn the program to a disc (CD, DVD, USB) and run it from there.

This article is a complete walkthrough on using DBAN, which covers downloading the program to your computer, burning it to a bootable device, and erasing all the files.

How to Erase a Hard Drive Using DBAN

  1. Download the DBAN program. To start, you have to download DBAN.

    DBAN download page

    You can do this on the same computer you're going to erase or on an entirely different one. However you do it, the goal is to get the ISO file downloaded and then burned to a bootable device like a CD or flash drive.

  2. Save the DBAN ISO file to your computer. When you're prompted to download DBAN to your computer, be sure to save it somewhere easy for you to access. Anywhere is fine, but make a mental note as to where.

    As you can see in this screenshot, we saved it to the Downloads folder in a subfolder called dban, but you can choose any folder you'd like, like the Desktop.

    DBAN download process in Google Chrome

    The download size is less than 20 MB, which is pretty small, so it shouldn't take very long at all to finish downloading.

    Once the DBAN file is on your computer, you need to burn it to a disc or USB device, which we cover in the next step.

  3. Burn DBAN to a disc or USB device. To use DBAN, you'll need to properly put the ISO file on a device that you can then boot from.

    The DBAN ISO is small enough to fit on a CD or even a flash drive. If all you have is something larger, like a DVD or BD, that's fine, too.

    DBAN burned disc

    DBAN can't just be copied over to a disc or USB device and be expected to work correctly, so be sure to follow the instructions in one of the links below if you're not already familiar with burning ISO images.

    In the next step, you'll boot from the disc or USB device you've just prepped in this step.

  4. Restart and boot into the DBAN disc or USB device. Insert the disc or plug in the USB device that you burned DBAN to in the previous step, and then restart your computer.

    You might see something like the screen below, or maybe your computer logo. Regardless, just let it do its thing. You'll know pretty quickly if something isn't right.

    standard PC POST/Boot Screen

    If Windows or whatever operating system you have installed tries to start like it normally does, then booting from this DBAN disc or USB drive has not worked.

  5. Choose an option from the DBAN main menu.

    DBAN is potentially just moments away from irreversibly erasing all the files on all your hard drives, so be sure to pay close attention to the instructions in this step and the following ones.

    The screen shown here is the main screen in DBAN and the one you should see first. If not, go back to the previous step and make sure you're booting from the disc or flash drive correctly.

    Before we get started, please know that DBAN is designed to be used with your keyboard only... your mouse is useless in this program.

    In addition to using the regular letter keys and the Enter key, you'll need to know how to operate the function (F#) keys. These are located at the top of your keyboard and are as easy to click as any other key, but some keyboards are a little different. If the function keys aren't working for you, be sure to hold down the Fn key first, and then select the function key you want to use.

    DBAN menu

    DBAN can work in one of two ways. You can either enter a command at the bottom of the screen to immediately start erasing all the hard drives you have plugged into your computer, using a predefined set of instructions. Or, you can choose the hard drives you want to erase, as well as select exactly how you want them to be deleted.

    DBAN Menu Options

    There are your options from the DBAN menu:

    • As you can see, the F2 and F4 options are informational only, so you don't have to be concerned about reading through them unless you have a RAID system set up (which probably isn't the case for most of you...you would probably know if so).
    • For the quick method of erasing every hard drive plugged in, you'll want to press the F3 key. The options you see there (as well as the autonuke one) are described in full detail in the next step.
    • To have the flexibility to choose the hard drives you want to erase, how many times you want the files to be overwritten, and more specific options, press the ENTER key at this screen to open interactive mode. You can read more about that screen in Step 7.

    If you know how you want to proceed, and you're confident that there's nothing on any connected drive that you want to keep, then go for it.

    Continue with this tutorial for some more options or if you're not sure which way to go.

  6. Immediately start using DBAN with a Quick Command. Choosing F3 from DBAN's main menu will open this Quick Commands screen.

    If you use any command you see on this screen, DBAN will not ask you which hard drives you want to erase, nor will you be required to confirm any prompts. Instead, it will automatically assume you want to remove all the files from all the connected drives and will immediately start deleting after you enter the command. To choose which hard drives to erase, press the F1 key, and then go to the next step, ignoring everything else on this screen.

    DBAN can use one of several different methods to erase files. The pattern used to erase the files, as well as how many times to repeat that pattern, are the differences you'll find in each of these methods.

    DBAN quick commands

    DBAN Commands and Data Sanitization Method

    In bold are the commands DBAN supports, followed by the data sanitization method they use:

    • dod - DoD 5220.22-M
    • dodshort - Same as dod except only 3 passes are run instead of 7
    • ops2 - RCMP TSSIT OPS-II
    • gutmann - Gutmann
    • prng - Random Data
    • quick - Write Zero

    You can also use the autonuke command, which is the same thing as dodshort.

    Select the links next to the commands to read more about how they work. As an example, gutmann will overwrite the files with a random character, and do so up to 35 times, whereas quick will write a zero and only do it once.

    DBAN recommends using the dodshort command. You can use any of them that you think is necessary, but ones like gutmann are surely an overkill that will only take more time to complete.

    Type one of these commands into DBAN to start wiping all your hard drives with that specific data wipe method. If you want to choose which hard drives to erase, as well as customize the wipe method, see the next step, which covers interactive mode.

  7. Choose which hard drives to wipe with Interactive Mode. Interactive mode lets you customize exactly how DBAN will erase files, as well as which hard drives it will wipe. You can get to this screen with the ENTER key from DBAN's main menu.

    If you don't want to do this, and would rather have DBAN erase all your files the easy way, restart this walkthrough at Step 4, and be sure to choose the F3 key.

    Along the bottom of the screen are the different menu options. Pressing the J and K keys will move you up and down a list, and the Enter key will select an option from a menu. As you change each option, the top left of the screen will reflect those changes. The middle of the screen is how you choose which hard drives you want to erase.

    DBAN interactive mode

    Pressing the P key will open the PRNG (Pseudo Random Number Generator) settings. There are two options you can choose from—Mersenne Twister and ISAAC—but keeping the default one should be perfectly fine.

    Selecting the letter lets you choose which wipe method you want to run. See the previous step for more information on these options. DBAN recommends choosing DoD Short if you're not sure.

    V opens a set of three options you can choose from to define how often DBAN should verify that the drive is empty after running the chosen wipe method. You're able to disable verification entirely, turn it on for the last pass only, or set it to verify the drive is empty after each pass has finished. We recommend choosing Verify Last Pass because it will keep verification on but won't require it to run after each pass, which would otherwise slow the whole process down.

    Choose how many times the chosen wipe method should run by opening the Rounds screen with the key, entering a number, and pressing ENTER to save it. Keeping it at 1 will run the method once, but should still be enough to erase everything securely.

    Finally, you must choose the drive(s) you want to erase. Move up and down the list with the J and keys, and press the Space key to select/deselect the drive(s). The word wipe will appear to the left of the drive(s) you choose.

    Once you're sure you've chosen all the correct settings, press the F10 key to begin wiping the hard drive(s) immediately.

  8. Wait for DBAN to erase the hard drive(s). Below is the screen that'll show once DBAN has started. As you can see, you can neither stop nor pause the process at this point.

    DBAN erasing a hard drive

    You can view the statistics, like time remaining and any number of errors, from the top right side of the screen.

  9. Verify DBAN has successfully erased the hard drive(s). Once DBAN has finished the data wipe of the selected hard drive(s), you'll see this DBAN succeeded message.

    DBAN Succeeded screen

    At this point, you can safely remove the disc or USB device that you've installed DBAN to, and then shut down or restart your computer.

    If you're selling or disposing of your computer or hard drive, then you're done.

    If you're starting from scratch, you'll need to make a clean Windows install or a clean Linux install.

FAQ
  • How do you erase a Mac's hard drive?

    You can factory reset a Mac to wipe its hard drive. Ensure you have a good backup, and sign out of any accounts. Restart the Mac in Recovery Mode and select Disk Utility from the Utilities window. Find your data volume and select  Edit > Delete APFS Volume. Select your hard drive, choose Erase, and follow the prompts.

  • How do I completely erase a hard drive?

    To completely erase a hard drive, wipe the hard drive using data destruction software. Another option: Use a degausser to disrupt the magnetic domains on the drive and permanently erase the hard drive.

  • How do I erase an external hard drive?

    To erase an external hard drive, connect the drive to your primary computer. Launch File Explorer, select This PC, and select the external drive. Right-click the drive > Format. Choose an appropriate file system, and follow the prompts.

Was this page helpful?