I was trying to wipe the free space of an external USB 3.0 disk in OS X (Yosemite) disk utility. However, I receive the following error: EDIT: The disk is formatted as GUID / Mac OS Extended (Journaled) and 1.1 of 2.0 TB are occupied. Jul 27, 2018 Erase Free Space on a Mac Hard Drive to Prevent File Recovery The Mac OS X Disk Utility app provides an ability to erase free space on traditional hard drives, which overwrites vacant disk space on the drive to prevent any potential recovery of deleted files (that is, files that have been removed traditionally, rather than through secure methods).
If you’re selling an old Mac with a hard drive, 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).
Editor’s note: This Terminal tip originally ran in March 2009 and is only useful for mechanical hard drives and not the SSDs found in newer Macs.
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).
This feature cane used whenever selling an old machine with a hard drive. Format the drive and install a fresh copy of macOS, then use Disk Utility to erase the free space (typically the one-time write-with-zeros option). 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.
Use Terminal to securely erase a drive
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.
(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. Proceed with caution, and make sure your backups are current before you try any of the following.)
To find out about diskutil
in detail, type man diskutil
at the Terminal prompt. Within the man
pages, you’ll find the explanation for how to securely erase a disk’s free space using diskutil
:
But 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. Just use diskutil list
to see a list of all drives and partitions. On the far right, you’ll see an IDENTIFIER
column; that column contains the identifier that diskutil
needs. Here’s an example of the list
output on my machine:
IDG
There’s just one last bit of information you need to know to erase the free space on a hard drive from the command line. In Unix, all devices appear as part of the file system tree, and in macOS, they’re all listed in the /dev
directory. So if I want to use diskutil
to erase the free space on my Apple_HFS Untitled
volume on my external drive, using the single-pass method, the final command would look like this:
diskutil secureErase freespace 1 /dev/disk2s1
Warning! It’s critically important that you include the freespace
portion of that command. If you don’t, diskutil
will happily start securely erasing the entire disk, instead of just the free space! Yes, that’s a Really Bad Thing, especially because it will be securely erased, meaning there’s no chance you’ll be able to recover the data.
A full startup disk is something that every Mac user will experience. This problem used to be known as “Startup disk full” notification. However, on newer macOS versions this message has been changed to “Your disk is almost full.”
But luckily, it’s a problem that has many solutions. And in this article, we’ll go over:
- What is startup disk full?
- What's causing 'Your disk is almost full' alert?
- How to fix startup disk full?
- How to prevent 'Your disk is almost full' problem?
However, we also understand that some people are short on time and just want to fix startup disk full. So, if you’re not really interested in what it is and why it happens, just skip the next two sections and head to “How to Clean Your Startup Disk”.
Or, even better, if you’re looking how to clear space on Mac, we’d highly recommend a utility called CleanMyMac X. It'll help you clean up gigabytes of disk space in just minutes (you can download it here).
Note: if you’re running a newer version of macOS, it has a built-in option of Optimized Storage that is supposed to solve the problem of the full hard drive by moving files into the cloud.
By clicking 'Manage' you can open the menu and see what Optimized storage offers. However, it moves junk and useless files to the cloud together with your files, and eventually, you end up paying for iCloud storage to store junk. So we still recommend getting CleanMyMac and actually dealing with extra files rather than simply moving them.
Now, with all that said, let’s get into what exactly “Your disk is almost full” means.
Understanding What “Your Disk is Almost Full” Means
What is a startup disk?
A startup disk, as taken from Apple Support article, is a volume or partition of a drive that contains a usable operating system. Still confused? Let’s break it down for you.
Your Mac hard drive consists of disks (or partitions). Each disk (or partition) has your Mac data on it, which consists of your operating system, applications, etc. Most Mac users have just one disk but power users may have two or more.
Let’s look at an example of a Mac with only one hard disk:
- Your Mac's hard drive is 500GB.
- It has one 'disk' on it, so all 500GB of storage is on that disk.
- The disk has an operating system (macOS Big Sur), and user data (apps, etc).
- And since you only have one disk, this is your startup disk: all 500GB.
A Mac with two disks will have the storage divided between them. The Mac drive with the OS on it is the startup disk while the other drive is just used for storage of files. It’s possible to have multiple startup disks, but most Macs will only have one. And for proper disk cleanup on Mac, all drives are just as important.
Why your disk is almost full?
This is easy. It’s a lot like why is your fridge full? There is no more space! Your disk is almost full and this is very bad news for any drive. A hard disk should never get beyond 85% capacity (especially a startup disk) as you will experience slowness and errors the further you get above that mark.
If your startup disk is full and you get a message of warning from your Mac, this is a serious indication that you need to clear up storage immediately.
What to do when your disk is almost full?
So how do you fix your almost full startup disk? The same way you solve the problem of a packed fridge - you need to clear up storage, of course. To make more space on your startup disk you will need to:
- Delete files from your Mac.
- Move files to an external hard drive or cloud storage.
- Or install a second internal hard drive on your Mac.
So, now that we know what a startup disk is, we need to talk about how to fix it. Let’s take a closer look at your disk space to see exactly what is causing your disk to be almost full.
What’s Causing 'Your Disk Is Almost Full' Alert?
Short version: Take a look under-the-hood of your Mac.
Before we can see what is taking up space on your startup disk, first we have to find it:
- Hover on the Dock at the bottom of your screen and open Finder.
- Click on “Finder” in the menu bar at the top of your screen.
- Then select “Preferences…”
- In the window that opens, checkmark the “Hard disks” checkbox.
After selecting this box, your desktop should now show the hard disks on your Mac, in the form of icon(s), like this:
These are disks on your Mac that you can “startup”, this is because they have operating systems on them. If there is more than one of these hard disk icons that show up on your desktop, it means you’ve got multiple hard disks on your Mac. If you only have one, skip the down to “What is taking up all of my startup disk space?” section.
If you have more than one, continue with the next step:
Click on the Apple icon at the top left of your screen System Preferences > Startup Disk.
Here, again, you’ll find your hard disk(s); they’re probably named something like MainSSD or MainHD. It will also display “OS” and the version number of that OS. If you have more than one OS drive, your startup disk should be the one with the latest version of macOS running on it, but we’re going to make sure of that in the next step.
I only have one and it looks like this:
To make 100% sure that you know what drive is your startup disk, follow these steps:
- Click on the Apple Icon in the menu at the top-left of your screen.
- Select “About This Mac.”
- Under macOS, you’ll find a version number. Mine is 11.01.1, like so:
See how my version number in the “About This Mac” window matches the number in my Startup Disk section? Yep — That’s my startup disk. Found yours? Good.
What is taking up all of my startup disk space?
Now that we’ve identified our startup disk, let’s take a closer look at how to clear up space on Mac:
- Click the Apple Icon in the menu at the top-left corner of your screen.
- Choose “About This Mac.”
- Click Storage.
Note: If you are running an older version of OS X you may have to first click “More Info…” and then “Storage”.
Take a look at my hard drive disk:
I’ve got 500GB of storage, and about 275GB of it is free.
So, how big is your hard disk? How much free space do you have (if any — *gulp*)? And what’s taking up the most space? It is important to consider drive capacity and data storage needs for future storage plans — we’re not just here to fix the problem, for now, we’re going to make sure you never have this problem in the future as well.
Now that we have the knowledge, it’s time to take action and fix your Mac’s “Startup Disk Full” problem.
How to clear disk space on Mac
Let’s go over 11 things you can do to help fix 'your disk is almost full.' These should also give you other ideas as to how else to fix it — You know your Mac better than we do!
1. Clear system storage on Mac
System storage cleanup sounds like a serious undertaking. But, technically, it boils down to just one thing: having the courage to scrap the old files.
- Search for large ZIP/RAR archives in Downloads.
- Open your Desktop (Command + F3) and delete screenshots.
- In Applications, sort your apps by size. Delete the largest ones.
- Restart your Mac to free up RAM.
- Get rid of system junk files with a free version of CleanMyMac X.
This app gives you lots of possibilities to free up space, especially when it comes to system junk. CleanMyMac X has been notarized by Apple, which basically means it's safe to use. And if you got 5 minutes, try this tool as it shows you where exactly your junk hides.
2. Clean up cache files on your Mac
Cache files are files that help your Mac run programs a bit more smoothly. Think of them like blueprints for a house: your Mac has the blueprints for how a program is supposed to load/run/look, so it loads it faster; without them, it’d be like building it from scratch. However, over time, these caches can start to take up some serious space. Periodically, removing them can help clear storage. And don’t worry, your Mac will create fresh, new ones after you restart your Mac. To remove caches:
- Open a Finder window and select Go in the menu bar.
- Click on “Go to Folder…”
- Type in ~/Library/Caches
Delete the files/folders that are taking up the most space. - Now click on “Go to Folder…”
- Type in /Library/Caches (simply lose the ~ symbol)
And, again, delete the folders that take up the most space.
Deleting cache files is generally safe for your Mac. And once you delete them, the applications and processes you run on your Mac will generate fresh, new ones. But, when deleting, worry more about removing them based on size rather than just removing all of them.
Also, you can check the /System/Library/Caches folder as well, but it might be better not to touch this folder without knowing what the items are. A utility that correctly cleans up these files (and pretty much everything else on this list) is, you guessed it, CleanMyMac X. It cleans up even your system caches with just a few clicks.
Oh, and once you’re done with this list, restart your Mac so it can create these new cache files.
Read more: How to Clear Cache on a Mac?
3. Get rid of localization files
Localization files are also known as “language packs.” Lots of apps come with other languages that you probably don’t need. To clear up space on your Mac, delete the ones you don’t need:
- Open a Finder window.
- Go to Applications.
- Ctrl+click on an application.
- Select “Show Package Contents.”
From here, go to Contents > Resources and look for files ending in .lproj. These are the languages your app has just in case you want to use it in another language, like Spanish (es.lproj). Drag the ones you’ll never use to the Trash.
Again, a safer alternative to this would be to use CleanMyMac X. It gets rid of all of them with a click. No digging through application folders, just a cleaner Mac.
Read more: How to Delete Language Files from macOS?
4. Delete duplicate files
Even if you have the most organized Mac on a planet, duplicates happen one way or another. It can be a file you’ve mistakenly downloaded twice or a mail attachment you’ve opened several times. Regardless of how they appeared, those files sit on your Mac and gobble up storage.
But finding and deleting them is a time-consuming process if you do it one by one. So here’s what you can do for a simple Mac disk cleanup:
- Open the Finder app on your Mac
- Move cursor over File and click New Smart Folder
- Click the “+” button in the upper right corner and choose the type of files you want to see
- Now sort them by name to quickly spot duplicates.
Remember to pay attention to the date of creation to make sure you keep the true original, not the copy.
While this is the best way to remove duplicates manually, it takes lots of your time and dedication. It’d be much easier to leave this to Gemini 2: The Duplicate Finder.
This app quickly scans your Mac for duplicate and similar files and allows you to delete them within minutes. It keeps your originals safe and helps you easily retrieve files deleted by accident.
5. Remove old iOS backups
Backups can tend to take up a lot of space. You can find and remove them by:
- Launching a Finder window.
- Clicking “Go” in the menu bar.
- Selecting “Go to Folder…”
- Then, type in ~/Library/Application Support/MobileSync/Backup/
Get rid of all the old, outdated backups your Mac has been storing for a bit more extra space.
6. Remove large and old files
Keeping many large files on your Desktop and in Documents slows down the system. And if you delete only a couple of these enormously large files, you can get half of your storage back.
Let’s open the familiar About this Mac pane once again. If you click Manage, you’ll see this window for sorting files.
While this instrument is good for finding large files, it misses a lot of things. See that “Other” category that takes up 38.GB?
To deepen your search for massive files, use this tool from CleanMyMac X. It’s called Large & Old files finder.
It’s much more helpful as it shows you lots of other categories of files, like Archives. The app breaks your files by Size and Last Used.
To see this instrument in action, download the free edition of CleanMyMac X. And click the Large & Old files at the bottom of the sidebar.
7. Remove unnecessary applications
This isn’t often overlooked, but definitely under-appreciated. Removing old, unused applications is a great way to get some extra space on your startup disk. Go through your applications folder and get rid of all the apps you rarely use. But make sure you remove them correctly, don’t just drag them to the Trash. If you do, you’ll leave behind tons of leftover parts and pieces, and we’re trying to get back startup disk space — It’ll kinda defeat the purpose, no?
This is another place we’d suggest using CleanMyMac X. To completely remove any application, just launch CleanMyMac X, click Uninstaller, select your application, and then click Uninstall. You won’t have to search all over for development junk that’s left behind when Trash’ing an application. It’s incredibly easy and saves you tons of time.
8. Move your Photos and Docs to the cloud
Erase Mac Internal Hard Drive
When your local storage is full to the brim, your Mac will start uploading this data to iCloud. But only if you have this setting enabled. Is your Photos app synced with iCloud already? Let’s check.
- Open Applications and find the Photos icon.
- Launch Photos and click on Preferences in the top menu.
Ticking the box iCloud Photos will connect your Photos library to iCloud. And what’s more important, if you select Optimise Storage, some part of your Photo library will be moved to iCloud. This way you macOS saves precious space. The free iCloud plan allows you to free up at least 5 GB worth of storage.
The similar logic applies to your Documents and other files. To set up the cloud backup with iCloud drive, go to System Preferences > Apple ID > iCloud.
9. Clean up your Downloads, Movies, and Music folders
Mac Disk Utility Erase Scheme
Have a closer look at these three folders. You’d be surprised at how many downloads can accumulate when you aren’t paying attention. Clean out anything you don’t need (or don’t know) and organize the rest. It’ll take a load off your mind to know that there’s nothing excess there.
The Movies folder can be a pain, not because you’re searching through tons of files, but it can be difficult to choose what to delete. Personally, I never want to get rid of Top Gun. It’s amazing. I watched it 3 times in a row last weekend. But alas, sometimes you need to make sacrifices for the health of your Mac. Though, what you can do with movies you want to keep is to archive them. So, archive what you wish to keep and remove the rest.
How to archive/compress a file
Archiving a file doesn’t mean to store deeper into the abyss of your Mac — but to turn the file into something smaller, into a compressed file (like .zip or .tar). By archiving a file, you shave off some memory. Archiving is essential for things you want to keep on your Mac, but don’t often use, and helps you clear up some space. And that’s what this is all about right? We’re essentially doing the hokey-pokey on your Mac. To archive a file, just:
- Ctrl+click the file you want to compress (recommended for movie files).
- Select, “Compress .”
The last place to sweep through is the Music folder. Find and remove duplicate music files first, and then clean up all the songs you downloaded on a weird Sunday afternoon cleaning the house.
10. Clean your Desktop
“Clean my desktop… but why?” Because some people’s desktops are hard to look at, that’s why. Organize your desktop and get rid of the stuff you just don’t need on there. It looks better and helps your Mac act a bit faster (I don’t know the rocket science behind this one, but it feels too good to be false). Your Mac doesn’t waste time loading all those icons and junk, just… Just clean it, please.
11. Empty out the Trash (No, we’re not joking…)
Seriously: It may sound incredibly basic, but it could clear a surprising amount of storage. I forget to do it all the time. The thing is, that when you delete something, your Mac doesn’t remove it — it just moves it to the Trash. Plus, you’ve probably deleted way more than you realize, and all that could be sitting in the Trash, wasting space. So get rid of all that junk by emptying the Trash:
- Ctrl+click your Trash in the Dock.
- Select “Empty Trash.”
- And click “Empty Trash.”
And, the easiest step is done.
Erasing A Mac
A few more tips to clear storage on Mac
1. Manage your Optimized Storage
This option comes with your operating system starting macOS Sierra. Go to the Apple menu > About this Mac > Storage
Now, click on Manage to reveal the space-saving options:
2. Erase your Junk Mail
Mac Disk Utility Erase Free Space On Hard Drive
Open your Mail app, and click Mailbox in the upper menu. Here you can erase spam and already deleted items.
Full Startup Disk Prevention
We’ve cleaned up a few things on your Mac, and hopefully, it’s given you more ideas as to what else you can clean. But, let’s take a look at how much space you saved from cleaning the list above. Remember how we checked your Mac’s free space? Open that window again and see how much space you’ve cleared up:
- Click the Apple Icon in the menu at the top-left corner of your screen.
- Choose “About This Mac.”
- Click Storage.
Note - If you are running an older version of macOS you may have to first click “More Info…” and then “Storage”.
Mac Disk Utility Erase Format
You’ve probably got a bit more space, and you’ll want to keep it that way. The only way to prevent a “your disk is almost full” is by keeping your Mac clean. We’d recommend a complete cleaning every 2–3 weeks.
Say goodbye to the 'Your startup disk is almost full” message.
We've told you how to delete storage on Mac in multiple ways. Hopefully, this has helped you fix that full startup disk problem. Your startup disk should now be quite a bit lighter (we hope). Oh, and if you liked this article, get social with it to help others in need. And if you really liked this article, subscribe to our email list — we’ve got more guides on the way. And we’ve also got a utility that’ll help you out a ton in the long run: CleanMyMac X. It helps you clean your entire Mac with just the click of a button. It’s incredibly easy to use and works like a charm.