CleanMate

All guides · macOS · Updated

Photos library taking up space on a Mac: Optimize Mac Storage, Recently Deleted and old libraries

Why the Photos library is often the biggest item on a Mac, and how to shrink it safely: Optimize Mac Storage in iCloud Photos, emptying Recently Deleted, finding old iPhoto or second libraries, and moving the library to an external drive. Never edit inside the library.

Download for macOS — free and open source

CleanMate Space Lens on a Mac, showing how big the Photos library is next to the other foldersCleanMate Space Lens on a Mac, showing how big the Photos library is next to the other folders

Photos keeps its pictures and videos in one file-like package, usually ~/Pictures/Photos Library.photoslibrary. Finder shows it as a single item, often the biggest one on the Mac. It also holds thumbnails, edits and the database that ties them together, so work through Photos, never inside the package.

See how big it is

In Finder, select the library in Pictures and press ⌘I. Or in Terminal (it needs Full Disk Access to read Pictures):

du -sh ~/Pictures/*.photoslibrary

System Settings › General › Storage › Photos shows the same total.

Optimize Mac Storage (iCloud Photos)

With iCloud Photos on, Photos › Settings › iCloud, choose Optimize Mac Storage instead of Download Originals to this Mac. The originals stay in iCloud and the Mac keeps smaller versions, downloading an original when you open or export it. macOS replaces originals only when space runs low, so the library shrinks over time, not at once. Your iCloud storage must be big enough to hold the whole library.

If this Mac is the only copy of your photos (no iCloud Photos, no backup), back it up before you change anything.

Empty Recently Deleted

Photos you delete stay in Recently Deleted (in the sidebar, under Utilities in recent macOS) for up to 30 days and still take space. Open it, click Delete All, and confirm. Those photos are gone for good, and with iCloud Photos also on your other devices.

Large videos are usually the quickest win: in the sidebar, Media Types › Videos, sort by size with View › Sort, and delete what you don’t need.

Old and second libraries

Libraries you no longer use still take their full size:

Find them:

mdfind "kMDItemContentType == 'com.apple.photos.library' || kMDItemContentType == 'com.apple.iphoto.library'"

Hold Option while you open Photos to see the list of libraries and which one is the System Photo Library (Photos › Settings › General). Open an old one first to check its photos are also in your current library or backup; then move it to the Trash, and empty the Trash once you’re sure.

Move the library to an external drive

  1. Quit Photos and drag the library onto a drive formatted APFS or Mac OS Extended (not exFAT).
  2. Hold Option, open Photos, choose the copy on the drive.
  3. With iCloud Photos, click Use as System Photo Library in Photos › Settings › General.
  4. Once the copy works, move the old library on the Mac to the Trash.

The drive must be connected whenever you use Photos.

Never edit inside the library

Don’t open the package (Show Package Contents) to delete folders such as originals or resources. Photos’ database still points to those files: you get missing photos, a library that needs repair, or iCloud uploading and downloading again. Delete photos in Photos.

How CleanMate does it

CleanMate 1.12 (all macOS features) never cleans Photos data: ~/Pictures is one of the folders its safety rules protect, so Smart Scan doesn’t touch it, and no module ever deletes inside a library package.

For other big folders see Find large files, Free up disk space on a Mac, System Data and iCloud Drive. Download CleanMate.

FAQ

Does Optimize Mac Storage delete my photos? No. The originals stay in iCloud; the Mac keeps smaller copies and downloads originals when needed.

Can I delete the library and keep the photos in iCloud? Only if iCloud Photos has finished uploading everything (Photos › Settings › iCloud shows the status). Optimize Mac Storage is the safer way to the same result.

Why is the library bigger than all my photos together? It also holds edited versions, thumbnails, the faces and search index, and the photos in Recently Deleted.

Looking for a free DaisyDisk alternative? See how Space Lens compares, feature by feature.

Skip the commands

Open source — star it on GitHub: CleanMate for macOS

How CleanMate decides what is safe to remove →