I
Immich2mo ago
pfung7

Delete from immich webUI does not remove the actual file on disk

Hi, I am new to Immich. I uploaded my photos and video to Immich. I use the storage template so the photos and video are saved on my external harddrive under folder e.g. (.../library/admin/2018/2018-06/). I deleted a few video from immich web ui and also empty the trash. I cannot see those video anymore in web ui, however, those deleted video are still exist in the file directory. Is there any way to ask Immich to also remove the actual file from the folder after they are deleted and empty the trash?
6 Replies
Immich
Immich2mo ago
:wave: Hey @pfung7, 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:
pfung7
pfung7OP2mo ago
i am not using any external library. I only use storage template to define my storage folder structure. I already check the folder and file permissions. They all are rwxrwxrwx I also try with http://[my-immich-url]/folders?path=%2Fdata%2Flibrary%2Fadmin%2F2024%2F2024-12 The deleted photo is not showing up even it still existing in this folder.
Sergey Katsubo
Sergey Katsubo2mo ago
Hey @pfung7 Could you follow the auto-post above and share - your compose + env - your Immich docker logs Logs will contain smth like LOG [Microservices:TrashService] Queued 1 asset(s) for deletion from the trash (if the logs were not purged yet) Let me know if this is a correct description of your case: - You have Storage Template defined - Immich container's /data/library is mounted on an external drive - You delete a file / files from UI. Then Empty trash (popup "Permanently deleted 1 asset") - Now the file disappears from Immich. It's not present anymore in timeline, trash, Folder view (Explorer) - But the file is still on the external drive, in a folder like /mnt/immich/library/admin/2024/2024-12 What does Immich do when you Empty trash: 1. It removes the file record from the database 2. It removes the file from disk. The deletion (unlink) from disk may fail: - if disk was disconnected - if permissions are lacking (you already checked that) - if filesystem behaves unexpectedly. BTW, what is your external drive's filesystem? What is your OS/setup? Anyway if step 2 fails there should be warnings in the log, e.g. Unable to remove file from disk
pfung7
pfung7OP2mo ago
"Env": [ "IMMICH_VERSION=release", "DB_PASSWORD=postgres", "DB_USERNAME=postgres", "DB_DATABASE_NAME=immich", "UPLOAD_LOCATION=/Volumes/FungNAS/immich-photos", "DB_DATA_LOCATION=./postgres", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/src/app/server/bin", "NODE_VERSION=22.17.0", "YARN_VERSION=1.22.22", "LD_LIBRARY_PATH=/usr/lib/jellyfin-ffmpeg/lib:/usr/lib/wsl/lib:", "NODE_ENV=production", "NVIDIA_DRIVER_CAPABILITIES=all", "NVIDIA_VISIBLE_DEVICES=all", "IMMICH_BUILD=16678484970", "IMMICH_BUILD_URL=https://github.com/immich-app/immich/actions/runs/16678484970", "IMMICH_BUILD_IMAGE=v1.137.3", "IMMICH_BUILD_IMAGE_URL=https://github.com/immich-app/immich/pkgs/container/immich-server", "IMMICH_REPOSITORY=immich-app/immich", "IMMICH_REPOSITORY_URL=https://github.com/immich-app/immich", "IMMICH_SOURCE_REF=v1.137.3", "IMMICH_SOURCE_COMMIT=007ba1d9efdc571c87ca1553dd28dbbfe7eeee2f", "IMMICH_SOURCE_URL=https://github.com/immich-app/immich/commit/007ba1d9efdc571c87ca1553dd28dbbfe7eeee2f" ], I tried to get logs but it's scrolling too fast. I export it to a file and stop around 5M. Then I search but found nothing like TrashService What you described are correct: - I have Storage Template defined - Immich container's /data/library is mounted on an external drive - I deleted a file / files from UI. Then Empty trash - the file disappears from Immich. It's not present anymore in timeline, trash, Folder view (Explorer) - But the file is still on the external drive, in a folder like /mnt/immich/library/admin/2024/2024-12 X if disk was disconnected (it's always connected) X if permissions are lacking (you already checked that) if filesystem behaves unexpectedly. BTW, what is your external drive's filesystem? What is your OS/setup? (I am using MacOS 12.3.1 on an old Intel based macbook air)
Sergey Katsubo
Sergey Katsubo2mo ago
Thanks. If the issue is reproducible, could you follow these steps: 1. Increase logging level: Admin Settings > Logging > "Debug" level 2. Start tailing logs docker logs -ft --tail 10 immich_server 3. Delete a file + empty trash. 4. Post logs. We may need to see your docker compose yml as well if the steps above does not help to pinpoint the root cause.
pfung7
pfung7OP2mo ago
I am so confused now. I tested again and it's working. But I discovered another issue. It's likely not an issue for immich. It is some behavior for my mac os folder. The behaviour is so weird. In short, mac os finder is not able to show a lot of files but I can ls the files in terminal. For example: when i use Finder to access "/data/library/admin/2025/2025-08" it appear to be a folder with 0 files when i use Terminal to ls the same folder, i can see all the files (over 1000 files) The weird thing is there are some folders that I see files with Finder. For example "/data/library/admin/2024/2024-12" it appear to be a folder with 6023 files when i use Terminal to ls this folder, I also get 6023 files. It is the files in those folders (I can access the files from folder) that cannot be deleted by immich if deleted via Web UI I don't know what exactly I did to resolve the issue of file not deleted but possibly because I stop start the docker container. This may get the thing resolved. However, I still cannot explain why some folders are appear to be empty with Finder but full of files when ls in Terminal. I still cannot figure out what can I do to make Finder see those disappeared files......

Did you find this page helpful?