Is it safe to delete the Photos Library on Mac?
Do not delete~/Pictures/Photos Library.photoslibrary
Photos Library.photoslibrary holds your photos and the Photos database. Why you should never delete or edit it in Finder, and how to shrink it safely.
Verdict: Do not delete. ~/Pictures/Photos Library.photoslibrary is your Photos library, holding the originals, edits, albums and the database that ties them together, so deleting it can lose photos for good. Apple's advice is plain: "do not manually access or alter the contents of a library in the Finder." Shrink it from inside Photos instead.
What lives in Photos Library.photoslibrary
By default the Photos library is stored in the Pictures folder of your home folder, as Apple notes in Move your Photos library to save space on your Mac. Finder shows it as a single file, but it is a package: a folder Photos manages itself. Inside are:
- the original photos and videos you imported, or smaller versions if Optimise Mac Storage is on
- edited versions, previews and thumbnails
- the database that records albums, people, places, edits and Memories
If you use iCloud Photos, this library syncs with iCloud and your other devices. With Optimise Mac Storage turned on, full-size originals stay in iCloud and the Mac keeps smaller versions when it needs the space.
What happens if you delete it
- Photos that exist only in this library are gone for good once the Bin is emptied, unless you have a backup such as Time Machine.
- iCloud Photos is not a guarantee. Even with it turned on, the library is the only copy of anything still waiting to upload, and of any extra library that isn't the one syncing with iCloud.
- Deleting parts of it is worse than deleting nothing. Removing files from inside the package can leave Photos with missing originals, broken thumbnails or a damaged database. This is why Apple says to use only the Photos app to work with a library, in Where are the items I imported into Photos on my Mac?.
Nothing in the library rebuilds from a cache. Treat all of it as personal data.
How to check its size safely
In Finder:
- Open your Pictures folder.
- Select Photos Library and choose File > Get Info (Command-I). The Size line shows how much it takes.
From Terminal:
du -sh ~/Pictures/"Photos Library.photoslibrary"
This only reads, and it measures the whole package without opening it in Finder. macOS protects the library, so Terminal may print "Operation not permitted" unless it has Full Disk Access in System Settings > Privacy & Security. Get Info gives you the same answer without changing any permissions.
The safest way to get the space back
- Turn on Optimise Mac Storage. In Photos, choose Photos > Settings, click iCloud, select the iCloud Photos tickbox, then select Optimise Mac Storage. Apple describes it in Optimise storage in Photos on Mac. Full-size originals are kept in iCloud, so you need enough iCloud storage for your whole library.
- Merge duplicates in Photos. Photos finds them for you: click Duplicates under Utilities in the sidebar, select the sets and click Merge. Apple's Remove duplicate photos and videos on Mac explains that the extra copies go to Recently Deleted.
- Delete what you don't want, then empty Recently Deleted. Deleted items stay in Recently Deleted for 30 days. To free the space now, open Recently Deleted under Utilities and choose Delete All, as described in Delete photos and videos or recover deleted ones on Mac. With iCloud Photos on, deletions reach your other devices too.
- Move the whole library to an external drive if it is still too big. Quit Photos, drag the library to a drive formatted as APFS or Mac OS Extended (Journaled), then double-click it there to open it. Once you have checked everything is there, move the original to the Bin and empty it. Apple advises against Time Machine backup drives and removable media such as SD cards and USB flash drives, and asks you to make sure the drive is connected before you open Photos.
Warning: emptying Recently Deleted and emptying the Bin after moving the library are both permanent. Make sure you have a backup first.
What never to touch
- Anything inside the library opened with Show Package Contents. Originals, resources and the database all depend on each other.
- The library itself because iCloud says it is up to date. Check that uploads have finished, and keep a backup.
- The library while Photos is open. Quit Photos before you move or copy it.
- Cleaner apps that offer to clear caches or thumbnails inside the library. Photos manages those itself.
Videos in iMovie or Final Cut libraries follow similar rules; see is it safe to delete the Movies folder. Photos synced through iCloud Drive's Mobile Documents folder are a separate case, and the Bin explains when space really comes back. For duplicates outside Photos, read how to delete duplicate files on a Mac safely.
How Headroom helps
Headroom never changes anything inside a Photos library: any path containing .photoslibrary is on its protected list, checked again right before every change. Its Duplicates and Large files tools skip the Photos library too, leaving duplicate photos there to Photos' own Duplicates album. The free Space map shows the library as one block, labelled "Photos library", so you can see what it costs you. For space you can clear safely elsewhere, use the cleaner. Download Headroom: the scan is free, and the $19 one-time licence covers up to three Macs.
Questions
Can I delete Photos Library.photoslibrary if I use iCloud Photos?
Not without checking first. Anything still waiting to upload exists only in that library. To save space safely, turn on Optimise Mac Storage so full-size originals stay in iCloud.
Why is my Photos library so big?
It holds every original you imported, edited versions and thumbnails. Without Optimise Mac Storage, full-size originals of your whole iCloud Photos library are kept on the Mac as well.
Does deleting photos free up space straight away?
Not until they leave Recently Deleted, which keeps them for 30 days. Delete them from Recently Deleted to get the space back sooner.
Can I move my Photos library to an external drive?
Yes. Quit Photos, drag the library to a drive formatted as APFS or Mac OS Extended (Journaled), and open it from there. Apple advises against Time Machine backup drives and removable media such as SD cards.