Filesystem files are not being deleted #6959

Closed
opened 2026-02-20 04:18:13 -05:00 by deekerman · 9 comments
Owner

Originally created by @ricardogil on GitHub (Oct 3, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I noticed the files I try to delete are never deleted from the filesystem (not an external lib).
Basically I tried using: Android APP, Chrom browser from Macbook, Immich APP and Immich API.
All shows "success" but the file still exists within filesystem.
I see no log errors.

One thing important to mention: It is happening with files that were initially within an External Lib.
So first I included file xxx.jpg within an ext. lib, later I imported all the images using immich-go.
I then removed the external lib and de-duplicated all the files using the Utilities-> Review Duplicates.

What happened is that these files are there forever, Im unable to clear trash and antything.

The OS that Immich Server is running on

Linux umbrel 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64 GNU/Linux

Version of Immich Server

v2.0.0 (but started with v1.39

Version of Immich Mobile App

v2.0.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

samsung m54

Your docker-compose.yml content

version: '3.7'
x-environment:
  NODE_ENV: production
  DB_HOSTNAME: immich_postgres_1
  DB_USERNAME: immich
  DB_PASSWORD: moneyprintergobrrr
  DB_DATABASE_NAME: immich
  REDIS_HOSTNAME: immich_redis_1
  LOG_LEVEL: debug
  JWT_SECRET: ${APP_SEED}
  DISABLE_REVERSE_GEOCODING: 'false'
  REVERSE_GEOCODING_PRECISION: '3'
  PUBLIC_LOGIN_PAGE_MESSAGE: ''
  IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003
services:
  app_proxy:
    environment:
      APP_HOST: immich_server_1
      APP_PORT: 2283
      PROXY_AUTH_ADD: 'false'
    container_name: immich_app_proxy_1
  server:
    image: ghcr.io/immich-app/immich-server:v2.0.0
    volumes:
      - /mnt/secure/upload:/data
      - /home/umbrel/umbrel/home/Photos:/mnt/ssd
    environment:
      NODE_ENV: production
      DB_HOSTNAME: immich_postgres_1
      DB_USERNAME: immich
      DB_PASSWORD: moneyprintergobrrr
      DB_DATABASE_NAME: immich
      REDIS_HOSTNAME: immich_redis_1
      LOG_LEVEL: debug
      JWT_SECRET: ${APP_SEED}
      DISABLE_REVERSE_GEOCODING: 'false'
      REVERSE_GEOCODING_PRECISION: '3'
      PUBLIC_LOGIN_PAGE_MESSAGE: ''
      IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003
    depends_on:
      - redis
      - postgres
    restart: on-failure
    container_name: immich_server_1
  machine-learning:
    image: >-
      ghcr.io/immich-app/immich-machine-learning:v2.0.0
    volumes:
      - ${APP_DATA_DIR}/data/model-cache:/cache
    environment:
      NODE_ENV: production
      DB_HOSTNAME: immich_postgres_1
DB_USERNAME: immich
      DB_PASSWORD: moneyprintergobrrr
      DB_DATABASE_NAME: immich
      REDIS_HOSTNAME: immich_redis_1
      LOG_LEVEL: log
      JWT_SECRET: ${APP_SEED}
      DISABLE_REVERSE_GEOCODING: 'false'
      REVERSE_GEOCODING_PRECISION: '3'
      PUBLIC_LOGIN_PAGE_MESSAGE: ''
      IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003
    restart: on-failure
    container_name: immich_machine-learning_1
  redis:
    image: >-
      redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    user: '1000:1000'
    restart: on-failure
    volumes:
      - ${APP_DATA_DIR}/data/redis:/data
    container_name: immich_redis_1
  postgres:
    image: >-
      ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:b5e2fcf89f01effa82f1a8c3415a680d5df3d90318f70d05ea7db7170934a659
    environment:
      NODE_ENV: production
      DB_HOSTNAME: immich_postgres_1
      DB_USERNAME: immich
      DB_PASSWORD: moneyprintergobrrr
      DB_DATABASE_NAME: immich
      REDIS_HOSTNAME: immich_redis_1
      LOG_LEVEL: log
      JWT_SECRET: ${APP_SEED}
      DISABLE_REVERSE_GEOCODING: 'false'
      REVERSE_GEOCODING_PRECISION: '3'
      PUBLIC_LOGIN_PAGE_MESSAGE: ''
      IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003
      POSTGRES_PASSWORD: moneyprintergobrrr
      POSTGRES_USER: immich
      POSTGRES_DB: immich
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
    restart: on-failure
    container_name: immich_postgres_1

Your .env content

using Umbrel, so no .env

Reproduction steps

  1. Added external library
  2. Scanned / imported all external files
  3. Using immich-go I loaded all the files of the external lib
  4. Removed external lib
  5. Tried to deduplicate (Utilities -> Review duplicate)
  6. Deleted files are in trash forever

...

Relevant log output

1- Check an specific file exists:
umbrel@umbrel:/mnt/secure/upload/library/admin$ ls -ls 2025/2025-09-27/null-20250825-WA0042.mp4
1208 -rw-r--r-- 1 umbrel root 1235722 Sep 27 19:50 2025/2025-09-27/null-20250825-WA0042.mp4


2- Tried to delete using using API:
[Nest] 27  - 10/03/2025, 7:05:10 PM   DEBUG [Api:LoggingInterceptor~e8qqe845] DELETE /api/assets 204 43.39ms ::ffff:192.168.50.12
[Nest] 27  - 10/03/2025, 7:05:10 PM VERBOSE [Api:LoggingInterceptor~e8qqe845] {"force":true,"ids":["f7988611-a140-41ea-aeb7-30fe1a049185"]}

3- check fs again (file stills there):
umbrel@umbrel:/mnt/secure/upload/library/admin$ ls -ls 2025/2025-09-27/null-20250825-WA0042.mp4
1208 -rw-r--r-- 1 umbrel root 1235722 Sep 27 19:50 2025/2025-09-27/null-20250825-WA0042.mp4

4- also tried the get via API, file stills exists:
GET /api/assets/f7988611-a140-41ea-aeb7-30fe1a049185
{
    "id": "f7988611-a140-41ea-aeb7-30fe1a049185",
    "createdAt": "2025-09-28T10:06:13.813Z",
    "deviceAssetId": "web-null-20250825-WA0042.mp4-1759002630538",
    "ownerId": "8581e8d1-1455-431b-a07c-ff80bb53d24e",
    "owner": {
        "id": "8581e8d1-1455-431b-a07c-ff80bb53d24e",
        "email": "xxxxxxx@gmail.com",
        "name": "xxxxxxxx",
        "profileImagePath": "",
        "avatarColor": "orange",
        "profileChangedAt": "2025-08-04T14:51:49.309659+00:00"
    },
    "deviceId": "WEB",
    "libraryId": null,
    "type": "VIDEO",
    "originalPath": "/data/library/admin/2025/2025-09-27/null-20250825-WA0042.mp4",
    "originalFileName": "null-20250825-WA0042.mp4",

it does not matter if I try to delete using API, web, app.... And all the files.
I see no error in docker logs (using. verbose)

Additional information

Image
Originally created by @ricardogil on GitHub (Oct 3, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I noticed the files I try to delete are never deleted from the filesystem (not an external lib). Basically I tried using: Android APP, Chrom browser from Macbook, Immich APP and Immich API. All shows "success" but the file still exists within filesystem. I see no log errors. One thing important to mention: It is happening with files that were initially within an External Lib. So first I included file xxx.jpg within an ext. lib, later I imported all the images using immich-go. I then removed the external lib and de-duplicated all the files using the Utilities-> Review Duplicates. What happened is that these files are there forever, Im unable to clear trash and antything. ### The OS that Immich Server is running on Linux umbrel 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64 GNU/Linux ### Version of Immich Server v2.0.0 (but started with v1.39 ### Version of Immich Mobile App v2.0.0 ### Platform with the issue - [x] Server - [x] Web - [x] Mobile ### Device make and model samsung m54 ### Your docker-compose.yml content ```YAML version: '3.7' x-environment: NODE_ENV: production DB_HOSTNAME: immich_postgres_1 DB_USERNAME: immich DB_PASSWORD: moneyprintergobrrr DB_DATABASE_NAME: immich REDIS_HOSTNAME: immich_redis_1 LOG_LEVEL: debug JWT_SECRET: ${APP_SEED} DISABLE_REVERSE_GEOCODING: 'false' REVERSE_GEOCODING_PRECISION: '3' PUBLIC_LOGIN_PAGE_MESSAGE: '' IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003 services: app_proxy: environment: APP_HOST: immich_server_1 APP_PORT: 2283 PROXY_AUTH_ADD: 'false' container_name: immich_app_proxy_1 server: image: ghcr.io/immich-app/immich-server:v2.0.0 volumes: - /mnt/secure/upload:/data - /home/umbrel/umbrel/home/Photos:/mnt/ssd environment: NODE_ENV: production DB_HOSTNAME: immich_postgres_1 DB_USERNAME: immich DB_PASSWORD: moneyprintergobrrr DB_DATABASE_NAME: immich REDIS_HOSTNAME: immich_redis_1 LOG_LEVEL: debug JWT_SECRET: ${APP_SEED} DISABLE_REVERSE_GEOCODING: 'false' REVERSE_GEOCODING_PRECISION: '3' PUBLIC_LOGIN_PAGE_MESSAGE: '' IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003 depends_on: - redis - postgres restart: on-failure container_name: immich_server_1 machine-learning: image: >- ghcr.io/immich-app/immich-machine-learning:v2.0.0 volumes: - ${APP_DATA_DIR}/data/model-cache:/cache environment: NODE_ENV: production DB_HOSTNAME: immich_postgres_1 DB_USERNAME: immich DB_PASSWORD: moneyprintergobrrr DB_DATABASE_NAME: immich REDIS_HOSTNAME: immich_redis_1 LOG_LEVEL: log JWT_SECRET: ${APP_SEED} DISABLE_REVERSE_GEOCODING: 'false' REVERSE_GEOCODING_PRECISION: '3' PUBLIC_LOGIN_PAGE_MESSAGE: '' IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003 restart: on-failure container_name: immich_machine-learning_1 redis: image: >- redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 user: '1000:1000' restart: on-failure volumes: - ${APP_DATA_DIR}/data/redis:/data container_name: immich_redis_1 postgres: image: >- ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:b5e2fcf89f01effa82f1a8c3415a680d5df3d90318f70d05ea7db7170934a659 environment: NODE_ENV: production DB_HOSTNAME: immich_postgres_1 DB_USERNAME: immich DB_PASSWORD: moneyprintergobrrr DB_DATABASE_NAME: immich REDIS_HOSTNAME: immich_redis_1 LOG_LEVEL: log JWT_SECRET: ${APP_SEED} DISABLE_REVERSE_GEOCODING: 'false' REVERSE_GEOCODING_PRECISION: '3' PUBLIC_LOGIN_PAGE_MESSAGE: '' IMMICH_MACHINE_LEARNING_URL: http://immich_machine-learning_1:3003 POSTGRES_PASSWORD: moneyprintergobrrr POSTGRES_USER: immich POSTGRES_DB: immich POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data restart: on-failure container_name: immich_postgres_1 ``` ### Your .env content ```Shell using Umbrel, so no .env ``` ### Reproduction steps 1. Added external library 2. Scanned / imported all external files 3. Using immich-go I loaded all the files of the external lib 4. Removed external lib 5. Tried to deduplicate (Utilities -> Review duplicate) 6. Deleted files are in trash forever ... ### Relevant log output ```shell 1- Check an specific file exists: umbrel@umbrel:/mnt/secure/upload/library/admin$ ls -ls 2025/2025-09-27/null-20250825-WA0042.mp4 1208 -rw-r--r-- 1 umbrel root 1235722 Sep 27 19:50 2025/2025-09-27/null-20250825-WA0042.mp4 2- Tried to delete using using API: [Nest] 27 - 10/03/2025, 7:05:10 PM DEBUG [Api:LoggingInterceptor~e8qqe845] DELETE /api/assets 204 43.39ms ::ffff:192.168.50.12 [Nest] 27 - 10/03/2025, 7:05:10 PM VERBOSE [Api:LoggingInterceptor~e8qqe845] {"force":true,"ids":["f7988611-a140-41ea-aeb7-30fe1a049185"]} 3- check fs again (file stills there): umbrel@umbrel:/mnt/secure/upload/library/admin$ ls -ls 2025/2025-09-27/null-20250825-WA0042.mp4 1208 -rw-r--r-- 1 umbrel root 1235722 Sep 27 19:50 2025/2025-09-27/null-20250825-WA0042.mp4 4- also tried the get via API, file stills exists: GET /api/assets/f7988611-a140-41ea-aeb7-30fe1a049185 { "id": "f7988611-a140-41ea-aeb7-30fe1a049185", "createdAt": "2025-09-28T10:06:13.813Z", "deviceAssetId": "web-null-20250825-WA0042.mp4-1759002630538", "ownerId": "8581e8d1-1455-431b-a07c-ff80bb53d24e", "owner": { "id": "8581e8d1-1455-431b-a07c-ff80bb53d24e", "email": "xxxxxxx@gmail.com", "name": "xxxxxxxx", "profileImagePath": "", "avatarColor": "orange", "profileChangedAt": "2025-08-04T14:51:49.309659+00:00" }, "deviceId": "WEB", "libraryId": null, "type": "VIDEO", "originalPath": "/data/library/admin/2025/2025-09-27/null-20250825-WA0042.mp4", "originalFileName": "null-20250825-WA0042.mp4", it does not matter if I try to delete using API, web, app.... And all the files. I see no error in docker logs (using. verbose) ``` ### Additional information <img width="453" height="283" alt="Image" src="https://github.com/user-attachments/assets/691a15a2-8f76-4fc1-821a-26fece00ef88" />
Author
Owner

@bo0tzz commented on GitHub (Oct 3, 2025):

Check the jobs screen and make sure everything is unpaused (in the top right)

@bo0tzz commented on GitHub (Oct 3, 2025): Check the jobs screen and make sure everything is unpaused (in the top right)
Author
Owner

@ricardogil commented on GitHub (Oct 4, 2025):

@bo0tzz right . There are no jobs paused. I also re-ran them all couple times to check if it would fix.

@ricardogil commented on GitHub (Oct 4, 2025): @bo0tzz right . There are no jobs paused. I also re-ran them all couple times to check if it would fix.
Author
Owner

@ricardogil commented on GitHub (Oct 4, 2025):

I was thinking in get the trash list from database then manually remove the listed files using a quick sh script and maybe it can fix this.

@ricardogil commented on GitHub (Oct 4, 2025): I was thinking in get the trash list from database then manually remove the listed files using a quick sh script and maybe it can fix this.
Author
Owner

@effsee00 commented on GitHub (Oct 6, 2025):

I think I'm experiencing this or a variation of assets not being deleted. Happy to share logs and/or create new issue if this is different.

Android backup dir: Camera.

Steps:

  1. Image created (from Camera), and backed up to server successfully.
  2. Image deleted from web UI (moved to Trash)
  3. Image disappears from Android view.
  4. Using web UI empty trash (and confirm deletion).
  5. Re-opening Android app and local copies reappear in view, and begin to sync to server.
  6. Previously deleted images are again visible in web UI.

Android App Version: 2.0.1 build.3021
Server: v2.0.1
App setting: Sync remote deletions [EXPERIMENTAL] =TRUE

@effsee00 commented on GitHub (Oct 6, 2025): I think I'm experiencing this or a variation of assets not being deleted. Happy to share logs and/or create new issue if this is different. Android backup dir: Camera. Steps: 1. Image created (from Camera), and backed up to server successfully. 2. Image deleted from web UI (moved to Trash) 3. Image disappears from Android view. 4. Using web UI empty trash (and confirm deletion). 5. Re-opening Android app and local copies reappear in view, and begin to sync to server. 6. Previously deleted images are again visible in web UI. Android App Version: 2.0.1 build.3021 Server: v2.0.1 App setting: **Sync remote deletions [EXPERIMENTAL]** =TRUE
Author
Owner

@ronzino83 commented on GitHub (Oct 6, 2025):

I think I'm experiencing this or a variation of assets not being deleted. Happy to share logs and/or create new issue if this is different.

Android backup dir: Camera.

Steps:

  1. Image created (from Camera), and backed up to server successfully.
  2. Image deleted from web UI (moved to Trash)
  3. Image disappears from Android view.
  4. Using web UI empty trash (and confirm deletion).
  5. Re-opening Android app and local copies reappear in view, and begin to sync to server.
  6. Previously deleted images are again visible in web UI.

Android App Version: 2.0.1 build.3021 Server: v2.0.1 App setting: Sync remote deletions [EXPERIMENTAL] =TRUE

i am having exactly the same. exactly....

_furthermore, since beta time line introduction (it was an huge improvement for a lot of other aspect but not the following) the "deletion" of assets become a nightmare, immich made a step backward on this topic.

  • if you delete from web, it will reappear on the smarpthone app (the bug we are speaking about)
  • if you delete from smartphone gallery, the asset will stay on server and app. no more experimental two-way deletion option is offered
  • if you delete from the app with the option to delete both on server and smartphone, asset on smartphone is not deleted.

it is impossible to tide up assets from everywhere and keep them synched_

@ronzino83 commented on GitHub (Oct 6, 2025): > I think I'm experiencing this or a variation of assets not being deleted. Happy to share logs and/or create new issue if this is different. > > Android backup dir: Camera. > > Steps: > > 1. Image created (from Camera), and backed up to server successfully. > 2. Image deleted from web UI (moved to Trash) > 3. Image disappears from Android view. > 4. Using web UI empty trash (and confirm deletion). > 5. Re-opening Android app and local copies reappear in view, and begin to sync to server. > 6. Previously deleted images are again visible in web UI. > > Android App Version: 2.0.1 build.3021 Server: v2.0.1 App setting: **Sync remote deletions [EXPERIMENTAL]** =TRUE **i am having exactly the same. exactly....** _furthermore, since beta time line introduction (it was an huge improvement for a lot of other aspect but not the following) the "deletion" of assets become a nightmare, immich made a step backward on this topic. - if you delete from web, it will reappear on the smarpthone app (the bug we are speaking about) - if you delete from smartphone gallery, the asset will stay on server and app. no more experimental two-way deletion option is offered - if you delete from the app with the option to delete both on server and smartphone, asset on smartphone is not deleted. it is impossible to tide up assets from everywhere and keep them synched_
Author
Owner

@Brodieman commented on GitHub (Oct 8, 2025):

I am having this issue as well. After deleting an image or video from the main "Photos" screen, (at least some) will stay in the Library > On This Device > Camera folder (or browsing to that folder from any other app).

@Brodieman commented on GitHub (Oct 8, 2025): I am having this issue as well. After deleting an image or video from the main "Photos" screen, (at least some) will stay in the Library > On This Device > Camera folder (or browsing to that folder from any other app).
Author
Owner

@ricardogil commented on GitHub (Oct 9, 2025):

Important to mention this issue is related to the server files and not the phone photos not being deleted when using Immich app.

@ricardogil commented on GitHub (Oct 9, 2025): Important to mention this issue is related to the server files and not the phone photos not being deleted when using Immich app.
Author
Owner

@ricardogil commented on GitHub (Oct 10, 2025):

I will close this. Without any change from my side, I noticed files started getting deleted. I used exactly same files as before, tried to remove using API and web/app and all worked. No idea what happened. Thanks

@ricardogil commented on GitHub (Oct 10, 2025): I will close this. Without any change from my side, I noticed files started getting deleted. I used exactly same files as before, tried to remove using API and web/app and all worked. No idea what happened. Thanks
Author
Owner

@ricardogil commented on GitHub (Oct 10, 2025):

I will close this. Without any change from my side, I noticed files started getting deleted. I used exactly same files as before, tried to remove using API and web/app and all worked. No idea what happened. Thanks

@ricardogil commented on GitHub (Oct 10, 2025): I will close this. Without any change from my side, I noticed files started getting deleted. I used exactly same files as before, tried to remove using API and web/app and all worked. No idea what happened. Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#6959
No description provided.