How to Delete Hard Dri­ve Space on Mac

This article is about How to Delete Hard Dri­ve Space on Mac. So read this free guide, How to Delete Hard Dri­ve Space on Mac step by step. If you have query related to same article you may contact us.

How to Delete Hard Dri­ve Space on Mac – Guide

After reading this title, you may be asking yourself: How will I delete the space on the hard drive that is already ‘free’?

Well, you may not know this, but after deleting any file from your Mac in the usual way, the file really remains there, just that it can no longer be used by your Mac. So when you add more files to your Mac, they ‘overwrite’ the space occupied by the unusable files you previously deleted.

What this means is that an advanced user who can keep your Mac can actually recover files that you previously deleted. Unless, of course, you safely delete them first.

For this, using the Terminal utility is perhaps the best way out, as it allows for much more control over what you are doing.

Important note: Always remember to use Terminal ONLY when you are sure of what you are doing, as a simple mistake when using this utility can cause serious damage to your Mac.

So let’s learn how to securely erase all free space on your Mac’s hard drive with Terminal.

First, here is the Terminal command that we will use. Just keep it there for now, as you will need to change it slightly before proceeding.

diskutil secureErase freespace 1 / dev / disk0s2

Base Terminal Command

This is because this command uses slightly different values ​​for each Mac, so before using it in Terminal, you will have to find the exact values ​​for your Mac first.

– The first value to change is the number ‘1’. In fact, you can choose between ‘1’, ‘2’ and ‘3’ here. Using the number ‘1’ erases the free space on your disk using a single random pass (a ‘pass’ means that the system overwrites deleted files once). The number ‘2’ uses a secure 7-pass wipe and the number ‘3’ uses a special algorithm to perform a secure 35-pass wipe.

Obviously, the higher the number chosen, the longer the process will take. Normally, using the numbers ‘1’ or ‘2’ should be more than enough to perform a safe erase.

– Now, the second value you need to know is the disk identifier number where you want to perform the process. To do this, open the Terminal and copy and paste this command:

diskutil list

List Terminal Command

This will display a list of all the hard drives on your Mac. What you need to copy is the identifier number next to the selected drive. In my case, I want to safely erase the free space on the 120.5 GB disk, so its Identifier number would be ‘disk0s2’.

With this information, you can now use the first command above:

diskutil secureErase freespace 1 / dev / disk0s2

Just be sure to keep the number at ‘1’ or change it to ‘2’ or ‘3’, depending on how secure you want the erase process to be. Also, change ‘disk0s2’ to your own hard drive’s identifier number. When you’re ready, press Enter / Return.

Terminal erasure

Terminal Off

After doing this, sit back and watch the Terminal work its magic, safely erasing all the free space on your hard drive.

back to menu ↑

Final note

I hope you like the guide How to Delete Hard Dri­ve Space on Mac. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.