Easy ways of clearing disk space

Duplicate finding apps can be useful, I suppose. I know I have a LOT of large duplicate photos lurking around that I just haven’t found time for (too busy scanning all my slides and negs… :-)

Compress documents and files that need to be kept but are not accessed regularly.

When you do order them, my personal #1 is (currently) the last item on your list. I always look for the largest candidates first. The tools you mentioned (I’m especially fond of OmniDiskSweeper, but I’ve used them all), let you do just that.

A more niche product which is really useful for developers is DevCleaner by Konrad Kolokowski. Xcode can be very piggy.

2 Likes

Bring back DiskDoubler!

2 Likes

I had the storage problem “upgrading” from a 1Tb iMac running Mojave to a 500Gb M2 Macbook Air running Sonoma (why does Apple think 500Gb is OK these days?) .

Rather than trying to delete numerous files, photos and music I ended up just moving my Photos library and active video files to an external drive.
That means, of course, that when the external drive is not attached I cannot use the Photos app, but I can live with that.
At home I connect the Macbook to a 32" LG monitor with a single USB-c cable. That provides video, power and access to the external drive (that is always connected to the monitor).

I realise this is not much help for Adam’s project but for some users it might be an alternative to daunting technical solutions.

1 Like

Don’t forget the Mail Downloads folder.
~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads/
https://talk.tidbits.com/t/dont-let-mail-attachments-accumulate-and-waste-space/20865
I found a lot of attachments-from-the-past there, deleted all of them, and saved 30 GB of hard disk space. (They were thousands of graphics files sent from my students.)

2 Likes

I just tested an old trick.
Restarting with shift will flush a lot of temporary files. The cache will, of course, build again so it is no permanent solution.
I lost 10 gig now on a system that was installed clean in November. I believe you can get rid of more if your mac has been running for more time.

The theoretical downside is that it might slow apps down, but I can’t say it bothers me.

First, find out where effort will pay off the most. Then delete that stuff and don’t worry about the itty-bitty.

This is soooo important! Don’t obsess about cleaning! I can’t tell you how many clients (and dinner party “clients”) have asked me whether they should delete this and that to save space and when I ask them what they want to delete and the capacity of their disk it’s preposterous. They’re worried about 200M of whatever when they have 700,000 megabytes free! It’s a decades-long holdover from small storage worries.

I’m a big fan of DaisyDisk. It’s become very elegant and really shows you what’s going on in that morass of a disk you have. That said, you have to be careful with DaisyDisk and the other “cleaners” because if you don’t really, exactly know what that big block of something does that seems so ripe for deletion you could be in a world of hurt.

As far as simple things (this is a great idea for a story, @ace), You might want to look in your AppleTV library and delete the movies you bought when you were 5 sheets to the wind and never have looked at again. (Ctrl/Right-click on the movie in the listing and choose Remove Download.)

Dave

2 Likes

There’s also the open source Disk Inventory X, which is based on the Linux KDirStat and its Windows port, WinDirStat.

Although the web page for Disk Inventory X says it is compatible with “macOS 10.13 - 10.15”, I am able to run version 1.3 (the latest version) on my macOS 14 (Sonoma) system without any problem.

I’ve been in exactly this situation a number times with friends wanting to upgrade macOS but apparently not having enough disk space to do so, even though Storage and Disk Utility show 50GB-odd free

  1. Empty Trash
  2. Check Downloads – move need-to-keep stuff to appropriate folders and delete the rest.
  3. Delete Caches
  4. Delete old Time Machine snapshots.
  5. Delete old iOS backups
  6. Copy the whole Movie and/or Music folder(s) to an external drive (already on external backup disks so this just extra insurance)
  7. Delete Movie and/or Music folders.
  8. Empty Trash
  9. Restart
  10. Upgrade macOS
  11. Copy Music and/or Movie folders back.
  12. Test

As @Gobit notes, it’s important to caveat this step as some people will have files/apps they use in the Downloads folder.

The other potentially quick win for someone really low on disk space is checking for runaway log files, as those can get quite large. This is something DaisyDisk or similar will help assess.

Go through the Photos app and cull all the garbage. It amazes me how much crap people keep. Videos they’ll never watch, hundreds or thousands of terrible photos no-one will ever see.

I’m a photographer by trade (long time ago) and I have hardly anything in my Photos library. Be your own harshest critic and eliminate the ‘cruft’.

Indeed, especially since Apple continued selling Sonoma-compatible machines with non-upgradeable 128 GB drives until surprisingly recently, e.g. the 2018 Mac mini and the 2019 MacBook Air.

I’m not sure when exactly the 128 GB configuration of the 2018 mini was dropped, but Apple sold new 2018 minis until January 2023, and new 128 GB MacBook Airs were sold until 2020.

I always start with the app GrandPerspective to get a quick graphical idea of the major space hogs on my disk. If you get it from SourceForge it’s free or $2.99 from the Mac App Store. This will help you decide which of the steps @ace listed would provide the most benefit.

I ran GrandPerspective and the biggest thing it found was that my “Pictures” folder contains both “Photos Library.photoslibrary” and “iPhoto Library.photolibrary”. Is it correct that the migration to Photos means that the iPhoto version is disposable? (I’m in Sonoma and haven’t intentionally used iPhoto in years–just want to make sure that the original conversion to Photos swept up everything and that there’s nothing lurking that will get confused if the old file goes away.)

Dave

I agree. That was a good app.

TL;DR: Yes. But disposing it won’t free much space because most of the image files are shared between the two libraries. See below for the details.

When Photos migrates an iPhoto library, the new library has hard-links to the same image files that the old library uses. So you can delete either one (but not both, obviously) without losing content, and without duplicating all the data.

You can see this from a Terminal session using the du (“disk usage”) command to view the sizes. du understands hard links and doesn’t double-count files if multiple links appear as it runs.

For a quick example of what I’m describing, I’m going to make a directory containing a copy of the system sounds. Then another that contains hard-links to those same sounds:

$ mkdir ~/tmp
$ cd tmp
$ mkdir sounds
$ cp /System/Library/Sounds/* sounds
$ mkdir linked_sounds
$ ln sounds/* linked_sounds

If you do an ls -i (to see the internal inode numbers that represent the actual file storage, you’ll see that the files in the two directories share the same inode numbers - proving that they are two directory entries referencing the same files:

$ ls -i sounds linked_sounds
linked_sounds:
84952759 Basso.aiff		84952766 Morse.aiff
84952760 Blow.aiff		84952767 Ping.aiff
84952761 Bottle.aiff	84952768 Pop.aiff
84952762 Frog.aiff		84952769 Purr.aiff
84952763 Funk.aiff		84952770 Sosumi.aiff
84952764 Glass.aiff		84952771 Submarine.aiff
84952765 Hero.aiff		84952772 Tink.aiff

sounds:
84952759 Basso.aiff		84952766 Morse.aiff
84952760 Blow.aiff		84952767 Ping.aiff
84952761 Bottle.aiff	84952768 Pop.aiff
84952762 Frog.aiff		84952769 Purr.aiff
84952763 Funk.aiff		84952770 Sosumi.aiff
84952764 Glass.aiff		84952771 Submarine.aiff
84952765 Hero.aiff		84952772 Tink.aiff

If I use the du command to view the size of each directory individually, you’ll see that each contains 4.6 MB:

$ du -sh sounds
4.6M	sounds

$ du -sh linked_sounds
4.6M	linked_sounds

But if I tell du to tell me the disk usage for both together, you’ll see that the second (based on the order I list them) will be 0 size, because all of its files were previously counted by the first directory:

$ du -sh sounds linked_sounds
4.6M	sounds
  0B	linked_sounds

$ du -sh linked_sounds sounds
4.6M	linked_sounds
  0B	sounds

You can do the same with your photo libraries, which are just directory trees containing all of the image and database files representing the library. If you run du against them individually, you’ll see a large size (what Grand Perspective reported), but if you run it against them both together, you’ll see that the second will be much smaller - the size of the files that are not shared with the first.

Here’s an example from my system. Photos Library.photoslibrary is the currently-active library. iPhoto Library.migratedphotolibrary is the original library that was used to create the Photos library. But the photos library has been used for several years since the migration (deleting many migrated pictures and importing many new ones), so they no longer have identical content.

Individually, the Photos library is 77 GB and the iPhoto library is 88 GB:

$ du -sh 'Photos Library.photoslibrary'
 77G	Photos Library.photoslibrary

$ du -sh 'iPhoto Library.migratedphotolibrary'
 88G	iPhoto Library.migratedphotolibrary

But if I check the usage of both together:

$ du -sh 'Photos Library.photoslibrary' 'iPhoto Library.migratedphotolibrary'
 77G	Photos Library.photoslibrary
 24G	iPhoto Library.migratedphotolibrary

$ du -sh 'iPhoto Library.migratedphotolibrary' 'Photos Library.photoslibrary'
 88G	iPhoto Library.migratedphotolibrary
 13G	Photos Library.photoslibrary

In other words:

  • The Photos library has 13 GB of data that is not present in the migrated iPhoto library
    • So deleting the Photos library would only free up 13 GB of space, not 77 GB.
  • The migrated iPhoto library has 24 GB of data that is not present in the Photos library
    • So deleting the iPhoto library will only free 24 GB of space, not 88 GB.
  • There is 64 GB of data that is shared by both libraries
  • The total disk usage for both libraries is 101 GB (not the 165 GB you’d get by adding together the size of the libraries measured individually).

It also means that if you drag/drop these libraries to new storage volumes (which will probably not preserve the hard links), the result will consume 64 GB more than they did in their original locations. Unless you copy them together using a utility that recognizes the hard-links and can preserve them on the destination device. I don’t know if any common Mac utilities (Finder? CCC?) will do this.

Unfortunately, accurately representing this sort of thing can be really tricky, so I’m not surprised that Grand Perspective (or any other tool, I assume) double-counts shared storage.

I think it would be really hard to present this data in a way that shows how two directories/packages are large individually but share a lot of storage with each other.

5 Likes

That was exceptionally helpful and detailed – thanks! It still freed up multiple GB of space, so I’m happy about that.

Dave

I have a MacBook Pro (mid 2009) running High Sierra. I just tried to restart holding down the shift key and got the circle with slash. Started back up with the start button on the MBP.

Question: how long do you hold down the shift key? I was still holding AFTER the ding.