What happens to thumbnails, etc. when deleting external library?
If I have an external library and immich has scanned it, generated thumbs, etc. and I then remove that external lib. Does this mean that those thubnails, etc. get purged and space is freed up? Or do they stay in the cache?
14 Replies
:wave: Hey @EbenezerIbiza,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:When deleting an external library Immich will delete corresponding assets from the database AND purge their thumbnails and so on from disk. Space is freed up.
DEBUG [Microservices:LibraryService] Will delete all assets in library 6456c1b6-3168-4b5e-b148-8e1764da7f28
DEBUG [Microservices:LibraryService] Queueing deletion of 23 asset(s) in library 6456c1b6-3168-4b5e-b148-8e1764da7f28
Deleting thumbnails & co in handleAssetDeletion
:
https://github.com/immich-app/immich/blob/f15376a107f5cab7acca9ad8968afa6a0f9caaf2/server/src/services/asset.service.ts#L252-L259Thank you for clarifying this!
Is there an offical way to MOVE the contents of an external library and KEEP all the thumbnails / facial scans and associated data in order to not have to re-create everything? I have some large external libraries that I want to relocate and wanted to know if there's a process to follow that keeps all the metadata.
No.
Worth me opening up a request for this? I imagine it's common
I don’t think so. Idk what you mean by move the external library but we really want to avoid special treatment for external libraries
Sometime in the future we might support moves for both, but that would be via a different mechanism
I hear you: I think the reality is 15+ years of Lightroom and established backup processes on NAS's mean that people have existing datasets that are large, and could change, but that they're not going to want to duplicate into the immich 'uploads' / not-external storage areas. How does that get handled?
MOVE the contents of an external library people have existing datasets that are large, and could change, but that they're not going to want to duplicate into the immich 'uploads' / not-external storage areas. How does that get handled?Frankly I didn't get it, maybe it's simply sleep deprivation on my side 🙂 Could you elaborate more about the "move" use case / scenario?
Sure. I currently have a large external library of family photos - 15 years worth, 2TB - and this resides on a storage medium that is handled by a NAS and accessed via an SMB share. This will at some point need to be upgraded and the data moved/relocated to a new NAS, possibly even a new storage type (SSD rather than HDD for speed, all mirrored etc).
At this point it might even change from SMB to NFS.
I presume with all these changes that the Immich app will , with one/any/all of the changes being made above, think that this is 'new' data. I don't want to have to re-run all the computationally expensive facial recog and thumb nail and h264 video re-rendering....
No, you just need to keep the same path inside the docker container..
^^ This.
Assuming the photos were on NAS1 mounted on the host as
/mnt/nas1
, then moved to NAS2 mounted on the host as /mnt/nas2
then changing the external lib volume mount from
to
will be completely transparent to Immich. As long as the same file stays at the same location inside Immich container, e.g. /photos/2025/2025-08/image.jpg
This thread has been closed. To re-open, use the button below.