I
Immich•2y ago
Jerry Ling

How to reset Default Library?

I have uploaded duplicated photos into default library (already exists in external), how do I reset the data base info? I have tried to delete the files in $UPLOAD_LOCATION/library but the numbers I see from Web portal (e.g. file size and assets counts) don't get updated and there doesn't seem to be a way to force re-scan
9 Replies
Jerry Ling
Jerry LingOP•2y ago
I don't want to delte immich I just want to reset default library to "empty" if I delete pg_data, I will lose all my metadata, I do not want that
etnoy
etnoy•2y ago
If you have SQL access, delete from assets where libraryid = <id>
Jerry Ling
Jerry LingOP•2y ago
is that all I need?
bo0tzz
bo0tzz•2y ago
That won't properly clean up thumbnails and such If you're comfortable doing a tiny bit of scripting against the API, you can get all the assets, filter them by library ID, then call the delete endpoint with them.
Jerry Ling
Jerry LingOP•2y ago
that's probably fine, I deleted everything except thumbs un the UPLOAD PATH I'm okay if there's some zombie files in thumbs I guess
etnoy
etnoy•2y ago
Actually, select as many assets as you can and press delete. That will only delete upload assets and skip external ones
Jerry Ling
Jerry LingOP•2y ago
🧠 I wish there's a way to "view by library" I guess, that would have been handy
etnoy
etnoy•2y ago
libraries are brand new, we're currently in the bugfix/performance enhancement part of the cycle. Maybe we'll add more features later

Did you find this page helpful?