# How can I get rid of these duplicates?

**URL:** <https://discourse.beets.io/t/how-can-i-get-rid-of-these-duplicates/2163>\
**Category:** Help\
**Created:** [September 21, 2022, 5:08pm UTC](https://discourse.beets.io/t/how-can-i-get-rid-of-these-duplicates/2163 "2022-09-21T17:08:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![centroid-tocatta](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@centroid-tocatta](https://discourse.beets.io/u/centroid-tocatta)\
**Post date:** [September 21, 2022, 5:08pm UTC](https://discourse.beets.io/t/how-can-i-get-rid-of-these-duplicates/2163/1 "2022-09-21T17:08:10Z")

</div>

I messed up at some point merging some backups and different servers.

I now have many artists that look like this:

```auto
ls -1 /music/library3/lana\ del\ rey/
'2012-Born To Die (The Paradise Edition)--2012-flac'
'2014-Ultraviolence (Deluxe)--2014-flac'
2014-Ultraviolence-polydor-2014-flac
2015-Honeymoon--2015-flac
2015-Honeymoon-polydor-2015-flac
'2017-Lust For Life-self-released-2017-flac'
'2017-Lust for Life-interscope records-2017-flac'
'2019-Norman Fucking Rockwell!--2019-flac'
'2019-Norman Fucking Rockwell!-interscope records-2019-flac'
'2021-Chemtrails Over The Country Club--2021-flac'
'2021-Chemtrails Over the Country Club--2021-flac'

```

The dup plugin doesn’t seem to find them. I’ve tried `beet move` and importing to a new library with `duplicate_action: skip`  
When I tried importing, I used `--noautotag`, if that’s relevant.

When I look at the tracks, they aren’t the exact same file.

```auto
ls -l 2014-Ultraviolence* | grep 01
2014-Ultraviolence (Deluxe)--2014-flac:
-rw-r--r-- 1 abc abc 41531656 Mar 15 2022 01 Cruel World.flac
2014-Ultraviolence-polydor-2014-flac:
-rwxr-xr-x 1 abc abc 42894696 Mar 14 2022 01 Cruel World.flac

```

I don’t have any special beets metadata or anything I need to keep.  
I’d totally understand if this isn’t a beets problem. If someone could point me to some bash or something that’ll help, that’d be cool too.

---

<div class="post-metadata">

**Author:** ![HG2S](https://avatars.discourse-cdn.com/v4/letter/h/c77e96/32.png) [@HG2S](https://discourse.beets.io/u/HG2S)\
**Post date:** [September 22, 2022, 2:49pm UTC](https://discourse.beets.io/t/how-can-i-get-rid-of-these-duplicates/2163/2 "2022-09-22T14:49:51Z")

</div>

For what it’s worth I use [Czkawka](https://qarmin.github.io/czkawka/instructions/Installation.html) for de-duping my collection. I hope it helps.

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [September 22, 2022, 3:21pm UTC](https://discourse.beets.io/t/how-can-i-get-rid-of-these-duplicates/2163/3 "2022-09-22T15:21:17Z")

</div>

It might be first worth checking that all the duplicates are actually in your library, by typing something like `beet ls -a albumartist:lana` or similar. If so, I think I would focus on debugging why the duplicates plugin is not working for you—staring at some verbose output could help!

---

<div class="post-metadata">

**Author:** ![centroid-tocatta](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@centroid-tocatta](https://discourse.beets.io/u/centroid-tocatta)\
**Post date:** [September 22, 2022, 3:38pm UTC](https://discourse.beets.io/t/how-can-i-get-rid-of-these-duplicates/2163/4 "2022-09-22T15:38:29Z")

</div>

Thanks. Interesting.

So, yes to 1:

```auto
beet ls -a albumartist:lana
Lana Del Rey - Honeymoon
Lana Del Rey - Lust for Life
Lana Del Rey - Norman Fucking Rockwell!
Lana Del Rey - Ultraviolence
Lana Del Rey - Born To Die (The Paradise Edition)
Lana Del Rey - Born To Die (The Paradise Edition)
Lana Del Rey - Chemtrails Over The Country Club
Lana Del Rey - Chemtrails Over the Country Club
Lana Del Rey - Honeymoon
Lana Del Rey - Lust For Life
Lana Del Rey - Norman Fucking Rockwell!
Lana Del Rey - Ultraviolence (Deluxe)

```

The for each one that has a dupe album, the duplicates plugin says:

```auto
duplicates: all keys ['mb_trackid', 'mb_albumid'] on item /music/library/lana del rey/2021-Chemtrails Over The Country Club--2021-flac/01 White Dress.flac are null or empty: skipping
duplicates: all keys ['mb_trackid', 'mb_albumid'] on item /music/library/lana del rey/2021-Chemtrails Over The Country Club--2021-flac/02 Chemtrails Over The Country Club.flac are null or empty: skipping
...
duplicates: all keys ['mb_trackid', 'mb_albumid'] on item /music/library/lana del rey/2021-Chemtrails Over the Country Club--2021-flac/11 For Free (feat. Zella Day & Weyes Blood).flac are null or empty: skipping
...

```

Now, looking at the --key option

`beet dup -a -k albumartist -k album -k format -albumartist:lana`

Seems to be finding them! Thanks! Now just making sure nothing will go horribly wrong if I use those `keys` and start moving deleting stuff.
