How to deal with duplicate folders created?

Hi there, me again.

I did something stupid apparently with beets, and the outcome of that is that now I have tons of duplicated folders.

for example:

chetbaker@maven ~ $ beet ls -a erlend
Erlend Øye - DJ-Kicks: Erlend Øye
Erlend Øye - DJ-Kicks: Erlend Øye
Erlend Øye - Legao
Erlend Øye - Legao
Erlend Øye - Sudden Rush
Erlend Øye - Sudden Rush
Erlend Øye - Unrest
Erlend Øye - Unrest
chetbaker@maven ~ $

Which basically means:

chetbaker@maven ~ $ ls -l Music/Erlend\ Øye/
total 24
drwxr-xr-x 2 chetbaker chetbaker 4096 Jul 18 18:34 'DJ-Kicks_ Erlend Øye'
drwxr-xr-x 2 chetbaker chetbaker 4096 Jul 18 21:19 'DJ-Kicks_ Erlend Øye [4560]'
drwxr-xr-x 2 chetbaker chetbaker 4096 Jul 18 18:34  Legao
drwxr-xr-x 2 chetbaker chetbaker 4096 Jul 18 21:19 'Legao [4561]'
drwxr-xr-x 2 chetbaker chetbaker  308 Jul 18 18:34 'Sudden Rush'
drwxr-xr-x 2 chetbaker chetbaker  258 Jul 18 21:19 'Sudden Rush [4562]'
drwxr-xr-x 2 chetbaker chetbaker 4096 Jul 18 18:34  Unrest
drwxr-xr-x 2 chetbaker chetbaker 4096 Jul 18 21:19 'Unrest [4563]'
chetbaker@maven ~ $

Considering the size of my library, I definitely need to work on removing the duplicate folders. I want to avoid the “nuclear option” of removing by hand the folders and then start from scratch importing the over 400GB of music.

Please help.

Huh! That’s pretty odd. It’s not just different folders—beets is tracking separate albums in its database. (Beets keeps track of albums as explicit groups of tracks, not just implicitly based on their metadata.)

For a given album, how many tracks are in each copy? Are they randomly divided between the two albums? Are all of them in one album copy, and the other one is empty? Because that would certainly make the answer easy…

For a given album, how many tracks are in each copy? Are they randomly divided between the two albums? Are all of them in one album copy, and the other one is empty? Because that would certainly make the answer easy…

chetbaker@maven ~ $ ls -la Music/Erlend\ Øye/Legao
total 103540
drwxr-xr-x  2 chetbaker chetbaker     4096 Jul 18 18:34  .
drwxr-xr-x 10 chetbaker chetbaker      220 Jul 18 21:19  ..
-rw-r--r--  1 chetbaker chetbaker  9075088 Jul 18 18:34 '01 - Fence Me In.mp3'
-rw-r--r--  1 chetbaker chetbaker 12086474 Jul 18 18:34 '02 - Garota.mp3'
-rw-r--r--  1 chetbaker chetbaker  8520247 Jul 18 18:34 '03 - Say Goodbye.mp3'
-rw-r--r--  1 chetbaker chetbaker  9025974 Jul 18 18:34 '04 - Peng Pong.mp3'
-rw-r--r--  1 chetbaker chetbaker 13528443 Jul 18 18:34 '05 - Bad Guy Now.mp3'
-rw-r--r--  1 chetbaker chetbaker  8089767 Jul 18 18:34 '06 - Who Do You Report To.mp3'
-rw-r--r--  1 chetbaker chetbaker  8547408 Jul 18 18:34 '07 - Whistler.mp3'
-rw-r--r--  1 chetbaker chetbaker 12370706 Jul 18 18:34 '08 - Save Some Loving.mp3'
-rw-r--r--  1 chetbaker chetbaker 13429170 Jul 18 18:34 '09 - Rainman.mp3'
-rw-r--r--  1 chetbaker chetbaker 11241201 Jul 18 18:34 '10 - Lies Become Part of Who You Are.mp3'
-rw-r-----  1 chetbaker chetbaker    61744 Jul 18 18:34  albumart.1.jpg
-rwxr-xr-x  1 chetbaker chetbaker    18055 Oct 25  2017  albumart.jpg

and the “clone” album goes:

chetbaker@maven ~ $ ls -la "Music/Erlend Øye/Legao [4561]"/
total 103456
drwxr-xr-x  2 chetbaker chetbaker     4096 Jul 18 21:19  .
drwxr-xr-x 10 chetbaker chetbaker      220 Jul 18 21:19  ..
-rw-r--r--  1 chetbaker chetbaker  9075088 Jul 18 21:19 '01 - Fence Me In.mp3'
-rw-r--r--  1 chetbaker chetbaker 12086474 Jul 18 21:19 '02 - Garota.mp3'
-rw-r--r--  1 chetbaker chetbaker  8520247 Jul 18 21:19 '03 - Say Goodbye.mp3'
-rw-r--r--  1 chetbaker chetbaker  9025974 Jul 18 21:19 '04 - Peng Pong.mp3'
-rw-r--r--  1 chetbaker chetbaker 13528443 Jul 18 21:19 '05 - Bad Guy Now.mp3'
-rw-r--r--  1 chetbaker chetbaker  8089767 Jul 18 21:19 '06 - Who Do You Report To.mp3'
-rw-r--r--  1 chetbaker chetbaker  8547408 Jul 18 21:19 '07 - Whistler.mp3'
-rw-r--r--  1 chetbaker chetbaker 12370706 Jul 18 21:19 '08 - Save Some Loving.mp3'
-rw-r--r--  1 chetbaker chetbaker 13429170 Jul 18 21:19 '09 - Rainman.mp3'
-rw-r--r--  1 chetbaker chetbaker 11241201 Jul 18 21:19 '10 - Lies Become Part of Who You Are.mp3'
chetbaker@maven ~ $

Please tell me I should not press the nuclear button. Thanks so much for your help

I see! So you have complete copies of the albums; not fragments or anything.

Maybe the answer is as simple as using the duplicates plugin to remove one copy?