Recovering deleted files #7803

Closed
opened 2026-02-20 05:07:06 -05:00 by deekerman · 2 comments
Owner

Originally created by @Redume on GitHub (Jan 18, 2026).

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

  • Yes

The bug

If I delete photos/videos using a third-party app, immich restores the file. The same thing sometimes happens if I delete them using the immich app. At first, the files are gone and they are really deleted, but if I reopen the app, they may be restored

(this can have a negative impact on the phone's storage).

For example, this happens to me when I upload files to my server, add them to my personal folder, delete them from my phone, then go to my personal folder and after a while exit it, and see that these deleted files have been restored again.

The OS that Immich Server is running on

Debian 13

Version of Immich Server

v2.5.1

Version of Immich Mobile App

v2.4.1 build.3030

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

Google pixel 8 pro (android 16)

Your docker-compose.yml content

services:
  immich-server:
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION}
    container_name: immich_server
    env_file:
      - .env
    environment:
      DB_HOSTNAME: immich_postgres
      REDIS_HOSTNAME: immich_redis
    depends_on:
      - redis
      - database
    ports:
      - "${IMMICH_PORT}:2283"
    volumes:
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    networks:
      - immich_net
      - default
    healthcheck:
      disable: false

  immich-machine-learning:
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION}
    container_name: immich_machine_learning
    healthcheck:
      disable: false
    networks:
      - immich_net
      - default
    restart: unless-stopped

  redis:
    image: docker.io/valkey/valkey:9@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f
    container_name: immich_redis
    restart: unless-stopped
    volumes:
      - redis-data:/data
    healthcheck:
      test: redis-cli ping || exit 1

  database:
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    container_name: immich_postgres
    env_file:
      - .env
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      DB_STORAGE_TYPE: 'HDD'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: unless-stopped
    shm_size: 128mb

networks:
  immich_net:
    name: immich_net

volumes:
  model-cache:
  redis-data:

Your .env content

# Immich environment variables
# https://docs.immich.app/install/environment-variables
UPLOAD_LOCATION=/srv/immich-storage/library #separate HDD drive for files
DB_DATA_LOCATION=/srv/immich-storage/postgres #separate HDD drive for files

# Timezone
TZ=Europe/Moscow

# The Immich version to use. You can pin this to a specific version like "v2.1.0"
IMMICH_VERSION=release

# Postgres password (A-Za-z0-9 only)
DB_PASSWORD=<DELETED>

###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

IMMICH_PORT=2283

Reproduction steps

...

Relevant log output

1) Upload media to the server
2) Add to your personal folder (this may not be necessary, but try it)
3) Delete media from your device using the immich app
4) Go to your personal folder
5) Exit your personal folder
6) Go to the folder from which you deleted media from your device (in the immich app)
7) If not, re-enter the app and repeat step 6

Additional information

Immich_log_2026-01-18T130947.382109.log

Immich_log_2026-01-18T132118.763653.log

Originally created by @Redume on GitHub (Jan 18, 2026). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug If I delete photos/videos using a third-party app, immich restores the file. The same thing sometimes happens if I delete them using the immich app. At first, the files are gone and they are really deleted, but if I reopen the app, they may be restored (this can have a negative impact on the phone's storage). For example, this happens to me when I upload files to my server, add them to my personal folder, delete them from my phone, then go to my personal folder and after a while exit it, and see that these deleted files have been restored again. ### The OS that Immich Server is running on Debian 13 ### Version of Immich Server v2.5.1 ### Version of Immich Mobile App v2.4.1 build.3030 ### Platform with the issue - [ ] Server - [ ] Web - [x] Mobile ### Device make and model Google pixel 8 pro (android 16) ### Your docker-compose.yml content ```YAML services: immich-server: image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION} container_name: immich_server env_file: - .env environment: DB_HOSTNAME: immich_postgres REDIS_HOSTNAME: immich_redis depends_on: - redis - database ports: - "${IMMICH_PORT}:2283" volumes: - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro restart: unless-stopped networks: - immich_net - default healthcheck: disable: false immich-machine-learning: image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION} container_name: immich_machine_learning healthcheck: disable: false networks: - immich_net - default restart: unless-stopped redis: image: docker.io/valkey/valkey:9@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f container_name: immich_redis restart: unless-stopped volumes: - redis-data:/data healthcheck: test: redis-cli ping || exit 1 database: image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 container_name: immich_postgres env_file: - .env environment: POSTGRES_USER: ${DB_USERNAME} POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' DB_STORAGE_TYPE: 'HDD' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data restart: unless-stopped shm_size: 128mb networks: immich_net: name: immich_net volumes: model-cache: redis-data: ``` ### Your .env content ```Shell # Immich environment variables # https://docs.immich.app/install/environment-variables UPLOAD_LOCATION=/srv/immich-storage/library #separate HDD drive for files DB_DATA_LOCATION=/srv/immich-storage/postgres #separate HDD drive for files # Timezone TZ=Europe/Moscow # The Immich version to use. You can pin this to a specific version like "v2.1.0" IMMICH_VERSION=release # Postgres password (A-Za-z0-9 only) DB_PASSWORD=<DELETED> ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich IMMICH_PORT=2283 ``` ### Reproduction steps 1. 2. 3. ... ### Relevant log output ```shell 1) Upload media to the server 2) Add to your personal folder (this may not be necessary, but try it) 3) Delete media from your device using the immich app 4) Go to your personal folder 5) Exit your personal folder 6) Go to the folder from which you deleted media from your device (in the immich app) 7) If not, re-enter the app and repeat step 6 ``` ### Additional information [Immich_log_2026-01-18T130947.382109.log](https://github.com/user-attachments/files/24694982/Immich_log_2026-01-18T130947.382109.log) [Immich_log_2026-01-18T132118.763653.log](https://github.com/user-attachments/files/24695035/Immich_log_2026-01-18T132118.763653.log)
Author
Owner

@mmomjian commented on GitHub (Jan 18, 2026):

#4282

@mmomjian commented on GitHub (Jan 18, 2026): #4282
Author
Owner

@goalie2002 commented on GitHub (Jan 18, 2026):

#4282

I think that covers the opposite direction (photos being reuploaded to Immich after being deleted from Immich), while I think this issue is talking about the opposite (photos being redownloaded to the phone after being deleted from the phone). The latter was fixed in #24218

@goalie2002 commented on GitHub (Jan 18, 2026): > [#4282](https://github.com/immich-app/immich/discussions/4282) I think that covers the opposite direction (photos being reuploaded to Immich after being deleted from Immich), while I think this issue is talking about the opposite (photos being redownloaded to the phone after being deleted from the phone). The latter was fixed in #24218
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#7803
No description provided.