[Feature]: Delete Duplicated Media #274

Closed
opened 2026-02-04 19:16:13 +03:00 by OVERLORD · 17 comments
Owner

Originally created by @swimminsparrow on GitHub (Sep 8, 2022).

Feature detail

A tool for managing and deleting duplicated content could be useful, checking the hash or the filename?

Platform

Web

Originally created by @swimminsparrow on GitHub (Sep 8, 2022). ### Feature detail A tool for managing and deleting duplicated content could be useful, checking the hash or the filename? ### Platform Web
Author
Owner

@panoti commented on GitHub (Sep 8, 2022):

Hi @swimminsparrow, we've already implemented duplicate identifier with sha1 checksum. A tool for managing and deleting duplicated content is also our further work.

@panoti commented on GitHub (Sep 8, 2022): Hi @swimminsparrow, we've already implemented duplicate identifier with sha1 checksum. A tool for managing and deleting duplicated content is also our further work.
Author
Owner

@swimminsparrow commented on GitHub (Sep 8, 2022):

Hi have this situation:

  1. Logged in with a device and sync a folder
  2. Logout
  3. Logged in with same device and same user and sync same folder
  4. A new dir under immich-data has been created and all the previous media have been resynced. The application shows both the "old" content and the new. Even if they are the same content
@swimminsparrow commented on GitHub (Sep 8, 2022): Hi have this situation: 1. Logged in with a device and sync a folder 2. Logout 3. Logged in with same device and same user and sync same folder 4. A new dir under immich-data has been created and all the previous media have been resynced. The application shows both the "old" content and the new. Even if they are the same content
Author
Owner

@alextran1502 commented on GitHub (Sep 8, 2022):

Hi have this situation:

  1. Logged in with a device and sync a folder
  2. Logout
  3. Logged in with same device and same user and sync same folder
  4. A new dir under immich-data has been created and all the previous media have been resynced. The application shows both the "old" content and the new. Even if they are the same content

This sounds like a bug. Where did you get the app?

Can you provide more information on your setup and device info?

@alextran1502 commented on GitHub (Sep 8, 2022): > Hi have this situation: > > 1. Logged in with a device and sync a folder > 2. Logout > 3. Logged in with same device and same user and sync same folder > 4. A new dir under immich-data has been created and all the previous media have been resynced. The application shows both the "old" content and the new. Even if they are the same content This sounds like a bug. Where did you get the app? Can you provide more information on your setup and device info?
Author
Owner

@swimminsparrow commented on GitHub (Sep 8, 2022):

Android version: 1.28.0 build.38
Server version: 1.26.0
Server OS: 2022-09-06-raspios-bullseye-arm64

@swimminsparrow commented on GitHub (Sep 8, 2022): Android version: 1.28.0 build.38 Server version: 1.26.0 Server OS: 2022-09-06-raspios-bullseye-arm64
Author
Owner

@panoti commented on GitHub (Sep 8, 2022):

@swimminsparrow your backend version is really old. You'd better upgrade to the latest version 1.28

@panoti commented on GitHub (Sep 8, 2022): @swimminsparrow your backend version is really old. You'd better upgrade to the latest version 1.28
Author
Owner

@alextran1502 commented on GitHub (Sep 8, 2022):

Android version: 1.28.0 build.38 Server version: 1.26.0 Server OS: 2022-09-06-raspios-bullseye-arm64

The dedup feature has been available since 1.27. We are going with the convention that the mobile app and the server must be on the same version to ensure compatibility.

@alextran1502 commented on GitHub (Sep 8, 2022): > Android version: 1.28.0 build.38 Server version: 1.26.0 Server OS: 2022-09-06-raspios-bullseye-arm64 The dedup feature has been available since 1.27. We are going with the convention that the mobile app and the server must be on the same version to ensure compatibility.
Author
Owner

@swimminsparrow commented on GitHub (Sep 8, 2022):

Hi @alextran1502 @panoti how can i upgrade the server version? thanks

@swimminsparrow commented on GitHub (Sep 8, 2022): Hi @alextran1502 @panoti how can i upgrade the server version? thanks
Author
Owner

@alextran1502 commented on GitHub (Sep 8, 2022):

You can do docker-compose pull then docker-compose up

@alextran1502 commented on GitHub (Sep 8, 2022): You can do `docker-compose pull` then `docker-compose up`
Author
Owner

@swimminsparrow commented on GitHub (Sep 9, 2022):

Ok thank you. I suppose the feature does not work retroactively so i should clean the current situation with duplicates and make further check for the new uploads

@swimminsparrow commented on GitHub (Sep 9, 2022): Ok thank you. I suppose the feature does not work retroactively so i should clean the current situation with duplicates and make further check for the new uploads
Author
Owner

@alextran1502 commented on GitHub (Sep 10, 2022):

FYI, new upload won't run into problem with duplication since we have the checking mechanism in place. The only edge case is the two identical files with two version, one is compressed and one is original, which will cause the duplication.

@alextran1502 commented on GitHub (Sep 10, 2022): FYI, new upload won't run into problem with duplication since we have the checking mechanism in place. The only edge case is the two identical files with two version, one is compressed and one is original, which will cause the duplication.
Author
Owner

@joeShuff commented on GitHub (Oct 26, 2022):

I'm also seeing some duplicate data after an initial upload via googlephotos takeout, then syncing my device photos. Guessing thats likely the edge case you speak of @alextran1502?

@joeShuff commented on GitHub (Oct 26, 2022): I'm also seeing some duplicate data after an initial upload via googlephotos takeout, then syncing my device photos. Guessing thats likely the edge case you speak of @alextran1502?
Author
Owner

@alextran1502 commented on GitHub (Oct 26, 2022):

I'm also seeing some duplicate data after an initial upload via googlephotos takeout, then syncing my device photos. Guessing thats likely the edge case you speak of @alextran1502?

@joeShuff if the file is compressed then we will see the duplication since the hash value is different with the uncompressed file

@alextran1502 commented on GitHub (Oct 26, 2022): > I'm also seeing some duplicate data after an initial upload via googlephotos takeout, then syncing my device photos. Guessing thats likely the edge case you speak of @alextran1502? @joeShuff if the file is compressed then we will see the duplication since the hash value is different with the uncompressed file
Author
Owner

@Robin-Sch commented on GitHub (Dec 29, 2022):

In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading.

For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated.

After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated".

@Robin-Sch commented on GitHub (Dec 29, 2022): In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading. For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated. After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated".
Author
Owner

@jrasm91 commented on GitHub (Dec 29, 2022):

It's worth noting too, that the sha1 hash is only unique per user.

@jrasm91 commented on GitHub (Dec 29, 2022): It's worth noting too, that the sha1 hash is only unique _per user_.
Author
Owner

@Robin-Sch commented on GitHub (Dec 29, 2022):

In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading.

For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated.

After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated".

Also I just noticed another problem, the "Backup up photo's and video's" counter is 0 (because the photo's and video's are already uploaded ig?)

@Robin-Sch commented on GitHub (Dec 29, 2022): > In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading. > > For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated. > > After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated". Also I just noticed another problem, the "Backup up photo's and video's" counter is 0 (because the photo's and video's are already uploaded ig?)
Author
Owner

@alextran1502 commented on GitHub (Dec 29, 2022):

In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading.

For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated.

After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated".

This might be the state glitch when uploading and updating the timeline. I noticed that sometime the websocket doesn't close properly lead to two uploading events triggered and showing duplication. If closing and reopening the app fix it, this is just cosmetic bug and we will get to it sometimes in the future

@alextran1502 commented on GitHub (Dec 29, 2022): > In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading. > > > > For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated. > > > > After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated". This might be the state glitch when uploading and updating the timeline. I noticed that sometime the websocket doesn't close properly lead to two uploading events triggered and showing duplication. If closing and reopening the app fix it, this is just cosmetic bug and we will get to it sometimes in the future
Author
Owner

@alextran1502 commented on GitHub (Dec 29, 2022):

In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading.

For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated.

After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated".

Also I just noticed another problem, the "Backup up photo's and video's" counter is 0 (because the photo's and video's are already uploaded ig?)

If this is not correct, please open a separate issue and provide the steps you have taken to arrive at the problem. I am not sure which operations were done and what is the expectation outcome from your brief report

@alextran1502 commented on GitHub (Dec 29, 2022): > > In the android app it shows duplicated files, on the web app it doesn't, after logging out and in again and re-uploading. > > > > > > For example, if I go to the date 26 nov on the android app, it shows 6 pictures, 3 unique and 3 duplicated. If I go to the date 26 nov on my computer, it shows 3 picutres, 3 unique and 0 duplicated. > > > > > > After closing and re-opening the app this got fixed, but if I didn't close the app it stayed "duplicated". > > > > Also I just noticed another problem, the "Backup up photo's and video's" counter is 0 (because the photo's and video's are already uploaded ig?) If this is not correct, please open a separate issue and provide the steps you have taken to arrive at the problem. I am not sure which operations were done and what is the expectation outcome from your brief report
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#274