[BUG] Deleting from Trash isn't deleting the picture file #1495

Closed
opened 2026-02-05 02:04:29 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @briandipalma on GitHub (Oct 22, 2023).

Originally assigned to: @shenlong-tanwen on GitHub.

The bug

Since the Trash feature update Immich has stopped deleting files. I can work around it by getting the files I need to delete from the Repair page and manually deleting them. I'm guessing clearing the Trash can should delete the files? Or is there still a hidden delay in the process?

The OS that Immich Server is running on

Ubuntu LTS

Version of Immich Server

1.82.1

Version of Immich Mobile App

1.82.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

.

Your .env content

.

Reproduction steps

1.
2.
3.
...

Additional information

No response

Originally created by @briandipalma on GitHub (Oct 22, 2023). Originally assigned to: @shenlong-tanwen on GitHub. ### The bug Since the Trash feature update Immich has stopped deleting files. I can work around it by getting the files I need to delete from the Repair page and manually deleting them. I'm guessing clearing the Trash can should delete the files? Or is there still a hidden delay in the process? ### The OS that Immich Server is running on Ubuntu LTS ### Version of Immich Server 1.82.1 ### Version of Immich Mobile App 1.82.0 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML . ``` ### Your .env content ```Shell . ``` ### Reproduction steps ```bash 1. 2. 3. ... ``` ### Additional information _No response_
Author
Owner

@shenlong-tanwen commented on GitHub (Oct 22, 2023):

@briandipalma Can you upload a new asset, check the path of it in the uploads folder, trash and subsequently empty it and then re-check the uploaded path and check whether the file is still not deleted?

Also, is this happening to all your assets or the ones that are recently uploaded / uploaded in the past?

@shenlong-tanwen commented on GitHub (Oct 22, 2023): @briandipalma Can you upload a new asset, check the path of it in the uploads folder, trash and subsequently empty it and then re-check the uploaded path and check whether the file is still not deleted? Also, is this happening to all your assets or the ones that are recently uploaded / uploaded in the past?
Author
Owner

@briandipalma commented on GitHub (Oct 23, 2023):

OK it looks like different directories in my library have different file permissions. Not a bug in Immich but it should probably be surfaced better? Immich could create the files but it couldn't delete them which is very weird.

@briandipalma commented on GitHub (Oct 23, 2023): OK it looks like different directories in my library have different file permissions. Not a bug in Immich but it should probably be surfaced better? Immich could create the files but it couldn't delete them which is very weird.
Author
Owner

@dRuEFFECT commented on GitHub (Oct 20, 2024):

i'm running the latest version of immich on docker with unraid, confirmed there are no permissions issues on the files or folders, and can confirm that emptying trash does NOT delete the actual files. this should be reopened

@dRuEFFECT commented on GitHub (Oct 20, 2024): i'm running the latest version of immich on docker with unraid, confirmed there are no permissions issues on the files or folders, and can confirm that emptying trash does NOT delete the actual files. this should be reopened
Author
Owner

@gdelazzari commented on GitHub (Oct 21, 2024):

I can also confirm this, on v1.118.2. No permission issues (Immich automatic checks pass, and from /bin/sh inside the container I can create and delete files under the library volume) but after deleting ~6GB of pictures and emptying the trash folder, the disk usage where the library is stored only decreased by less than 1GB.

Administration/Server Stats instead correctly shows that the library is using 6GB less than before.

Is there a workaround at the time being to make Immich delete the dangling files from the library folder?

@gdelazzari commented on GitHub (Oct 21, 2024): I can also confirm this, on v1.118.2. No permission issues (Immich automatic checks pass, and from `/bin/sh` inside the container I can create and delete files under the library volume) but after deleting ~6GB of pictures and emptying the trash folder, the disk usage where the library is stored only decreased by less than 1GB. *Administration/Server Stats* instead correctly shows that the library is using 6GB less than before. Is there a workaround at the time being to make Immich delete the dangling files from the library folder?
Author
Owner

@dRuEFFECT commented on GitHub (Oct 21, 2024):

Is there a workaround at the time being to make Immich delete the dangling files from the library folder?

the only thing i can think of is changing the root folder of the user, or the folder structure, then run migration on the existing assets, and lastly manually delete the files remaining in the original location. i know the folder structure approach should work as i ran that and there were trashed files left over in the original folders, that's how i discovered they weren't actually deleted. changing the library name for the user might not work if it just renames the existing folder and file locations in the db, rather than migrating one asset at a time, but i'm not sure how it actually operates.

@dRuEFFECT commented on GitHub (Oct 21, 2024): > Is there a workaround at the time being to make Immich delete the dangling files from the library folder? the only thing i can think of is changing the root folder of the user, or the folder structure, then run migration on the existing assets, and lastly manually delete the files remaining in the original location. i know the folder structure approach should work as i ran that and there were trashed files left over in the original folders, that's how i discovered they weren't actually deleted. changing the library name for the user might not work if it just renames the existing folder and file locations in the db, rather than migrating one asset at a time, but i'm not sure how it actually operates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1495