How do you securely erase a USB drive on a Mac?

Securely erasing a USB drive is important on a Mac for several reasons:

To protect your privacy and ensure sensitive data cannot be recovered. When you normally delete files from a USB drive, the data is not actually erased from the disk – only the file reference is removed. By securely erasing, you overwrite the data to make it unrecoverable. This prevents unauthorized access to personal, financial, medical or confidential data if your USB drive is lost or stolen. (Source)

To reformat or repurpose the USB drive. Secure erase allows you to wipe the USB drive completely clean so you can change file systems or reformat it for a new purpose. It’s a quick and simple way to start fresh with a USB drive.

To remove malware or Trojans. Performing a secure erase can help remove persistent malware or threats that may have infected your USB drive.

To prevent data recovery. Even after reformatting a USB drive, data remnants may remain that could be recovered with special software tools. Securely erasing the drive removes any trace of old data.

Before selling, recycling or disposing of a USB drive. Securely erasing ensures no sensitive data remains if the USB drive changes hands.

When To Securely Erase a USB Drive

There are several scenarios where you may want to securely erase the data on a USB drive before selling, giving away or repurposing the drive:

When selling or giving away the drive – If you are planning to sell or give away your USB drive, you’ll want to make sure no personal or sensitive data remains on the drive. Securely erasing the drive ensures the next owner cannot recover your deleted files (source).

Before donating to charity or recycling – Donating or recycling old USB drives is environmentally friendly, but you’ll want to securely wipe your data first. Erasing the drive prevents others from accessing your information (source).

When repurposing the drive – If you want to reuse your USB drive for a different purpose, you’ll likely want to completely wipe the existing data first. Secure erasure ensures no old files remain on the drive.

When disposing of the drive – If you are throwing away an old USB drive, you should run a secure erase to destroy any personal data still on the drive.

How Drive Erasure Works

When you delete a file on your computer, it is not actually erased from the drive. The operating system simply marks the space that file was occupying as available for new data. The original data still physically exists on the drive until it gets overwritten by new files.

Securely erasing a drive involves overwriting the existing data to make it unrecoverable. There are two main methods for doing this:

Overwriting with new data – This involves filling the drive with meaningless code that overwrites the sectors where your files existed. Typically this is done multiple times to ensure the original data cannot be recovered.

Degaussing – This utilizes strong magnets to disrupt and randomize the magnetic alignment of data bits on a drive. Degaussing permanently damages the drive.

The key difference between simply deleting versus securely erasing is that the original files are overwritten so they cannot be forensically recovered later. Deleting alone is not sufficient for secure erasure. The data must be overwritten by new meaningless data.

Sources:

https://en.wikipedia.org/wiki/Data_erasure

https://www.eurosoft-uk.com/guide-to-hard-drive-data-wiping/

Requirements

To securely erase a USB drive on a Mac computer, you need the following:

  • A USB drive you want to erase
  • An Intel-based Mac running Mac OS X 10.6 Snow Leopard or later (source)
  • Administrator access to the Mac
  • Disk Utility app or Terminal app (both included with macOS)

Older PowerPC-based Macs do not include the security options needed for securely erasing a USB drive. You’ll need a relatively modern Intel-based Mac running a supported version of macOS.

Preparing the USB Drive

Before erasing the USB drive, it’s important to back up any files or data you want to keep. Connect the USB drive to your Mac and copy the files to your Mac’s internal drive or to another external drive. Once the files are backed up, you can proceed with erasing the USB drive.

The next step is to reformat the USB drive to Mac OS Extended format, which will prepare it to be securely erased. To do this:

  1. Open Disk Utility on your Mac. You can find it by going to Applications > Utilities > Disk Utility.
  2. In the left sidebar, select the USB drive you want to erase.
  3. Click the Erase button at the top of the Disk Utility window.
  4. Give the drive a name and select “Mac OS Extended (Journaled)” as the format.
  5. Click Erase to reformat the drive.

Once the reformat is complete, the USB drive is ready to be securely erased using Disk Utility or Terminal.

Using Disk Utility

One method to securely erase a USB drive on a Mac is by using the Disk Utility application that comes pre-installed on macOS. Here is a step-by-step process to erase a drive using Disk Utility:

  1. Connect the USB drive you want to erase to your Mac.
  2. Open Disk Utility (located in Applications > Utilities).
  3. In the left sidebar, select the USB drive you want to erase.
  4. Click the “Erase” button near the top of the Disk Utility window.
  5. Give the drive a name and select a format like Mac OS Extended (Journaled).
  6. Important – Choose “Most Secure” from the Security Options drop down menu. This will securely overwrite the data on the drive.
  7. Click “Erase” and confirm again on the popup.

Disk Utility will now securely erase and reformat the USB drive. The “Most Secure” option overwrites the data several times to prevent any chance of recovery. This is the recommended method for securely erasing a USB drive on a Mac.

For more details, see Apple’s guide: Erase and reformat a storage device in Disk Utility on Mac

Using Terminal

The Terminal app provides a command line interface to securely erase a USB drive on a Mac. Here are the step-by-step terminal commands:

1. Connect the USB drive to your Mac.

2. Open the Terminal app, which is located in the Utilities folder.

3. Type diskutil list and press enter. This will show a list of all available drives connected to your Mac.

4. Identify the disk name for your USB drive, it will likely start with /dev/diskN where N is a number.

5. Use the diskutil secureErase command to securely erase the USB drive (cite: https://easyosx.net/2022/08/29/erase-a-macs-hard-drive-using-the-terminal/):

diskutil secureErase freespace 3 /dev/diskN

Replace /dev/diskN with your disk name from the previous step.

6. Type your admin password and press enter to start securely erasing the USB drive.

7. The terminal will show the progress of the erase. Wait for it to finish.

8. Once completed, you can close the Terminal app.

Your USB drive is now securely erased and ready to be reused.

Verifying the Erase

After erasing the USB drive, it’s important to verify that the erase was successful. Here are a couple ways to check on Mac:

In Disk Utility, select the USB drive and click Info. If the drive has been successfully erased, it should show the full capacity as Available and Used should show 0 bytes. This confirms no data remains on the drive. You can also open the drive and confirm there are no files. However, Disk Utility hides hidden or system related data. So you’ll want to run another confirmation.

In Terminal, run the command diskutil list to see all drives. Then run diskutil verifyDisk /dev/diskX (replace X with your disk number). It will verify the drive and report if any errors. You should see “No problems found” if the erase was successful.

Between Disk Utility and Terminal, you can feel confident your USB drive was securely erased. Both tools inspect the full drive and surface any corrupted or unerased data.

Alternative Methods

There are some other options for securely erasing a USB drive on a Mac besides using Disk Utility or Terminal:

Third Party Apps

You can use third party erasure tools like DoYourData Super Eraser which offers more advanced erase methods than Disk Utility. These kinds of apps let you choose from various standards like DoD 5220.22-M or Peter Gutmann’s 35-pass algorithm to securely wipe the drive.

Physical Destruction

For ultimate peace of mind, you can physically destroy the USB drive. This involves physically damaging the flash memory chips inside the USB drive, usually by disassembling the drive and cutting or crushing the chips. However this does render the USB drive unusable afterwards.

Some degaussing devices may also be able to physically damage the drive by exposing it to a strong magnetic field, erasing the data in the process.

Reusing the USB Drive

After securely erasing a USB drive, you can reformat it and reuse it again. The erase process completely wipes the drive, allowing you to use it like new. There are a few things to keep in mind when reusing an erased USB drive:

First, you’ll need to reformat the drive before you can store new files on it. After erasing with Disk Utility or Terminal, the drive will show up as “uninitialized.” Use Disk Utility to reformat it with a compatible file system like APFS, Mac OS Extended, or ExFAT [1]. This will prepare the empty drive for reuse.

Second, remember that secure erase options like multi-pass overwrite are time consuming. It may take hours to complete depending on the USB drive’s capacity. Plan accordingly if you need to erase and immediately reuse the drive.

Third, there is no limit on how many times you can erase and reuse a USB drive. Secure erase processes do not degrade or damage the drive over time. You can safely erase and reformat a USB drive as often as needed [2].

Finally, consider encryption options like FileVault if you will be storing sensitive data on the erased USB drive. This will add an extra layer of security as you reuse the device [3].