-
From a botched merge of libraries with PowerPhotos a long time ago I have very large amount of duplicate albums in Photos, several hierarchies deep (see screenshot1). A lot of these albums are empty, and also show up as such when I call Is there a way to use osxphotos 0.65.0 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This isn't possible out of the box but via the PhotoScript library (another of my projects) it is possible to delete albums and folders. I think it would not be hard to write a script that osxphotos could run to do this. Let me think about it and get back to you. |
Beta Was this translation helpful? Give feedback.
-
@habi I wrote a quick script to do this that can be run with osxphotos (version 0.65.0 and later). You can run the script directly from GitHub without downloading it first via:
It has only 2 options: There is one limitation: empty subfolders cannot be deleted (though these will be listed so you can manually delete them). This is due to a bug in Apple Photos that frustratingly has been there since macOS Catalina. I'm on Ventura and it's still not fixed (have not tested Sonoma). |
Beta Was this translation helpful? Give feedback.
@habi I wrote a quick script to do this that can be run with osxphotos (version 0.65.0 and later). You can run the script directly from GitHub without downloading it first via:
osxphotos run https://raw.githubusercontent.com/RhetTbull/osxphotos/main/examples/delete_empty_albums.py --folders --dry-run
It has only 2 options:
--folders
: prune empty folders and--dry-run
: show what will be done without actually deleting anything.There is one limitation: empty subfolders cannot be deleted (though these will be listed so you can manually delete them). This is due to a bug in Apple Photos that frustratingly has been there since macOS Catalina. I'm on Ventura and it's still not fixed (have not …