- #How to partition a mac using terminal how to
- #How to partition a mac using terminal install
- #How to partition a mac using terminal plus
Just use diskutil list to see a list of all drives and partitions. Consider using APFS encryption (FileVault).īut how do you figure out what to list for device, which is the disk (or partition) that has the free space you’re trying to securely erase? diskutil can provide that information, too. Strongly-encrypted data can be instantly "erased" by destroying (or losing) the key (password), because this renders your data irretrievable in practical terms.
The modern solution for quickly and securely erasing your data is encryption. Modern devices have wear-leveling, block-sparing, and possibly-persistent cache hardware, which cannot be completely erased by these commands. NOTE: This kind of secure erase is no longer considered safe.
#How to partition a mac using terminal plus
O 4 - Three-pass erase, consisting of two random fills plus a final zero fill. O 2 - Seven-pass erase, consisting of zero fills and all-ones fills plus a final random fill. Ownership of the affected disk is required. If you need to erase all contents of a partition but not its hosting whole-disk, use the zeroDisk or randomDisk verbs. Erasing freespace on a volume will leave your files intact, indeed, from an end-user perspective, it will appear unchanged, with the exception that it will have attempted to make it impossible to recover deleted files. Secure erasing makes it harder to recover data using "file recovery" software.Įrasing a whole-disk will leave it useless until it is partitioned again.
#How to partition a mac using terminal how to
Within the man pages, you’ll find the explanation for how to securely erase a disk’s free space using diskutil: secureErase level deviceĮrase, using a "secure" (but see the NOTE below) method, either a whole-disk (including all of its partitions if partitioned), or, only the free space (not in use for files) on a currently-mounted volume. To find out about diskutil in detail, type man diskutil at the Terminal prompt. Proceed with caution, and make sure your backups are current before you try any of the following.)
(Please note that, as with many Terminal commands, there’s a chance of Really Bad Things happening if you make a mistake with the following instructions. What if you want to do this from Terminal instead? In Terminal, a program named diskutil provides most of the features of macOS’s Disk Utility. This gives me a good sense of security, as it would take a team of dedicated professionals, and possibly special hardware, to have some chance of recovering any of my deleted data-though I really only care about a few financial files, and those are kept on an encrypted disk image, so they’re probably safe anyway.
#How to partition a mac using terminal install
First I format the drive and install a fresh copy of macOS, then I use Disk Utility to erase the free space (typically the one-time write-with-zeros option). I use this feature whenever I sell an old machine. When you click this button, you’re presented with three options for securely erasing the free space on your hard drive: write over the free space with zeros (fast and relatively safe), write over the free space three times (more secure, very slow), or write over the free space seven times (extremely slow). If you’re selling an old Mac, a spare hard drive, or you’re just quite paranoid about your deleted data, you’re either familiar with-or should be familiar with-the Erase Free Space button on the Erase tab in Disk Utility (found in your Applications -> Utilities folder).