Apple app storage

Is It Safe to Delete the Photos Library Cache on Mac? What Actually Happens

If your Mac is running low on storage, the Photos app is one of the first places worth investigating — and you've probably wondered is it safe to delete the photos cache on Mac. The short answer is: yes, with important nuance. Photos generates several layers of cache — thumbnail previews, face-recognition data, HEIF transcodes, and iCloud download buffers — and most of them can be cleared without losing a single original photo. But not all cache folders behave the same way, and deleting the wrong one at the wrong time can force Photos to rebuild days of index data. This guide breaks down exactly what lives where, what's safe, and what the real-world consequences are on macOS Sequoia and Tahoe running on both Apple Silicon and Intel Macs.

What Is the Photos Library Cache, Exactly?

Photos.app does not store one monolithic cache file. Instead it distributes working data across several locations:

  • Inside the Photos Library bundle — The library itself lives at ~/Pictures/Photos Library.photoslibrary and is a macOS package (a folder disguised as a file). Inside it, resources/derivatives/ holds resized and converted previews. This is not technically a cache directory but it can grow very large.
  • System cache for Photos~/Library/Caches/com.apple.Photos/ stores transient UI and thumbnail data that Photos will regenerate automatically on next launch.
  • CloudKit and iCloud sync buffers~/Library/Caches/CloudKit/ and related subdirectories hold partially downloaded originals and sync metadata.
  • Image analysis and Vision data — stored inside the library bundle under database/ and partially under ~/Library/Caches/com.apple.mediaanalysisd/, this powers Memories, face recognition, and semantic search.

Understanding which layer is bloated tells you where to focus your cleanup effort.

Where Is the Photos Cache Located on Mac?

The table below maps each cache component to its path and gives a realistic size range observed on libraries with 20,000–80,000 photos in 2025–2026:

Cache component Path Typical size Safe to delete manually?
App UI & thumbnail cache ~/Library/Caches/com.apple.Photos/ 100 MB – 2 GB Yes — rebuilds on next launch
Media analysis cache ~/Library/Caches/com.apple.mediaanalysisd/ 200 MB – 1.5 GB Yes — face/scene data regenerates (takes time)
CloudKit sync buffer ~/Library/Caches/CloudKit/ 50 MB – 800 MB Yes — iCloud re-syncs on next connection
Preview derivatives (inside library) ~/Pictures/Photos Library.photoslibrary/resources/derivatives/ 5 GB – 40+ GB Use Photos' built-in repair tool, not manual deletion
Face recognition database ~/Pictures/Photos Library.photoslibrary/database/ 500 MB – 3 GB No — deleting corrupts the library

Will Deleting the Photos Cache Remove My Actual Photos?

No. Your original photos and videos are stored inside the Photos Library bundle at ~/Pictures/Photos Library.photoslibrary/originals/. Cache directories contain derived, reconstructable data only. Deleting ~/Library/Caches/com.apple.Photos/ does not touch originals, albums, edits, or metadata. If you use iCloud Photos, your originals also exist on Apple's servers and will re-download on demand.

The one scenario where you could cause problems is if you manually reach inside the library bundle and delete files from database/ or originals/. macOS treats the library as an opaque package precisely to prevent accidental manipulation of those critical files. Stick to the system-level cache directories in ~/Library/Caches/ and you are safe.

How to Safely Delete the Photos Cache on Mac (Step-by-Step)

Follow these steps on macOS Sequoia or Tahoe to clear the Photos app cache without risking your library:

  1. Quit Photos completely. Make sure Photos is not running — use Command-Q or right-click the Dock icon and choose Quit. Deleting cache files while the app has them open can cause corruption.
  2. Open Finder and navigate to the cache folder. Press Command-Shift-G in Finder and paste: ~/Library/Caches/com.apple.Photos. Press Return.
  3. Move the folder to Trash. Select the com.apple.Photos folder and press Command-Delete to move it to Trash. Do not permanently delete it yet.
  4. Optionally clear the media analysis cache. Repeat step 2–3 for ~/Library/Caches/com.apple.mediaanalysisd. Note: deleting this means Photos will re-run face recognition and scene analysis, which can take several hours on a large library and will use CPU/battery during that time.
  5. Empty Trash. Once you have confirmed Photos opens and behaves normally, empty the Trash to reclaim disk space.
  6. Relaunch Photos. On first launch after clearing the cache, Photos will rebuild thumbnails and UI data. Expect it to be slower for a few minutes while it catches up.

If you want to clear the cache from Terminal instead, you can use:

rm -rf ~/Library/Caches/com.apple.Photos
rm -rf ~/Library/Caches/com.apple.mediaanalysisd

But the Finder method is safer if you prefer to verify what you are deleting before committing.

What About the Preview Derivatives Inside the Library?

The biggest potential space savings is often not in the system cache but inside the library bundle itself, under resources/derivatives/. These are resized JPEG and HEIF versions of your photos that Photos generates for fast display. On large libraries they can exceed 40 GB.

Do not manually delete files from inside Photos Library.photoslibrary. Instead, use Photos' built-in repair tool:

  1. Hold Option-Command while launching Photos.
  2. In the dialog that appears, choose Repair Library.
  3. Photos will remove orphaned derivatives and rebuild inconsistent previews.

This is the only supported way to clean up derivatives. Manual deletion can leave the database referring to missing files, which causes the spinning beach ball on every scroll.

How Much Space Can You Actually Reclaim?

Results vary considerably based on library size and iCloud configuration:

  • Small library (<5,000 photos, iCloud Photos on): Clearing the system caches typically returns 200 MB – 800 MB. Most originals are in iCloud, so derivatives are small.
  • Medium library (5,000–30,000 photos, mixed local/cloud): System caches plus derivatives cleanup via the repair tool can free 2 GB – 8 GB.
  • Large library (30,000+ photos, originals stored locally): System caches alone can be 2–4 GB; derivatives may be 20 GB or more. Using the repair tool and then enabling Optimize Mac Storage in Photos Preferences can be transformative.

For a broader picture of what is consuming your storage, including app caches beyond Photos, see what is taking up space on my Mac — it covers the full breakdown macOS shows in System Settings and what each category actually means.

Using Optimize Mac Storage Instead of Manual Deletion

If you use iCloud Photos, the cleanest long-term solution is to let macOS manage derivative and original storage automatically. Go to System Settings > Apple ID > iCloud > Photos and enable Optimize Mac Storage. With this on, macOS will automatically replace full-resolution originals with lightweight previews when disk space is tight, downloading the original on demand when you actually open a photo.

This is not the same as deleting cache — it is a dynamic storage policy that keeps your Mac lean without requiring you to manually intervene. For users with 50,000+ photos on a 256 GB SSD, this feature alone can recover 30–80 GB.

Keeping Photos Cache Under Control Going Forward

Cache bloat tends to accumulate silently. A few habits keep it manageable:

  • Run the Photos library repair (Option-Command at launch) once or twice a year to prune orphaned derivatives.
  • After major iOS device imports — especially 4K video — clear the system cache to remove transcoding buffers that are no longer needed.
  • If you use multiple Photos libraries (swapped via Option at launch), each library has its own derivatives. Libraries you rarely open can be archived to an external drive.
  • Check ~/Library/Caches/ periodically. A tool like Crumb can audit all of these cache folders at once and show what is safe to remove before you delete anything, so you are not guessing at cryptic bundle identifiers.

Understanding what cache files on a Mac actually are helps set expectations: caches are always a trade-off between speed and disk space. Photos' cache in particular is tuned for a fast scrolling experience across thousands of images, so clearing it has a brief performance cost before Photos rebuilds what it needs. For most users that cost is worth the disk space reclaimed.

Reclaim your disk in one click

Crumb audits your whole Mac, tells you what's safe to delete, and frees the space in seconds — private, local, and Apple-notarized.

Download Crumb for macOS

Frequently asked questions

Is it safe to delete the Photos cache on Mac?
Yes. Deleting the contents of ~/Library/Caches/com.apple.Photos/ is safe — Photos will rebuild this cache automatically on next launch. Your original photos, edits, and albums are stored inside the Photos Library bundle and are not affected. Avoid manually deleting files inside the library bundle itself.
Where is the Photos cache stored on Mac?
The main Photos app cache is at ~/Library/Caches/com.apple.Photos/. Media analysis data (face recognition, scene detection) is at ~/Library/Caches/com.apple.mediaanalysisd/. Preview thumbnails generated inside your library live at ~/Pictures/Photos Library.photoslibrary/resources/derivatives/.
Will I lose my photos if I clear the Photos cache?
No. Original photos live in ~/Pictures/Photos Library.photoslibrary/originals/ and in iCloud if you have iCloud Photos enabled. Cache folders only contain derived, reconstructable data such as thumbnails and preview images.
How much space can I recover by deleting the Photos cache?
The system-level cache folders typically hold 200 MB to 4 GB depending on library size. The bigger opportunity is often the preview derivatives inside the library bundle itself, which can reach 40 GB or more on large libraries. Use Photos' built-in library repair tool to clean those safely.
How long does it take Photos to rebuild its cache after I delete it?
The UI cache rebuilds in minutes. If you also delete the media analysis cache, face recognition and Memories can take several hours to regenerate on libraries with tens of thousands of photos, and your Mac will be doing background CPU work during that time.