Thousands of duplicate files in system trash

Odrive has just dumped over 11,000 duplicate photos in my trash. Many of them have names ending in (1), (2), up to (8) in some cases. Some don’t have any number after them. If I put them back, I see that they’re duplicates. It looks like somehow duplicates are popping up (bad), then Odrive is detecting them (smart), but throwing out the originals instead of the copies (dumb). Right now I’ve quit Odrive and I’m painstakingly putting back all the files; my plan is to resolve the duplicate problem by hand by keeping the originals (otherwise I have all these files which suddenly have (4) at the end of their filenames).

Can this be fixed?

OS X 10.11, Odrive is up to date.

Looking through some more, it appears that my Odrive is totally screwed up. Two of my mirrored drives are gone completely, and the third one is missing all sorts of files. I don’t know what happened but I desperately hope that all my files still exist. What do I do??

Tons of files in the trash on the Google Drive web interface, too.

I don’t quite understand what you are seeing, but if you see items in the Google Drive trash then that would indicate that something other than odrive created some deletes, unless you had previously emptied the odrive trash. Odrive won’t commit any deletes to the cloud unless you empty odrive trash (or have it set to auto-empty).

Do you have other clients running, like the Google Drive desktop client?

Can you provide some info on what you were doing recently that may have touched the files you see in trash?

Also, are you running the latest version of the odrive client (5174)?


I didn’t do anything. Odrive was sitting there totally fine for a while, I didn’t interact with it at all (I haven’t in a couple days) other than plugging in my external where it’s stored. Then after a while of nothing happening, 11,000 items appeared in my trash. I don’t have Google Drive Desktop, just Odrive.

Turns out it’s version 5158, but I don’t know how to update it—I thought it auto-updated?

Let me know if there’s any other info I can give you.

Here’s an example of what I’m talking about. All these files are from Odrive.

Oh I see. You see these files in the OS X trash, not the odrive trash. I thought you saw them in the odrive-specific trash.

Can you tell me how it is configured with your external drive? Do you use odrive for backup only?

As for a way to move forward here, even though I don’t have all the details, I can propose some next steps.

If you want to “Put Back” the files that are in the trash you can try the following:

  1. Open a terminal
  2. Move all of the duplicate files out of the trash to this temporary directory. Since the files were on an external drive, I am going to guess that they are located in the “Trashes” directory on the root of that drive. You can figure this out by navigating to it with something like this, where “DRIVENAMEHERE” is the name of your mounted external drive:
    cd /Volumes/DRIVENAMEHERE/.Trashes

Then list the content:

Trash can also be located in ~/.Trash, so if you don’t see the files on the external drive you may find them there.

To move the dupes, we’ll make a temp directory to move them too:
mkdir /Volumes/DRIVENAMEHERE/temp_trash

Then perform the move. This will move all of the duplicates from your trash to a temporary directory, which you can delete later, if you wish. The purpose is to reduce the current Trash to just the files you want:
mv /Volumes/DRIVENAMEHERE/.Trashes/*\([0-9]\).jpg /Volumes/DRIVENAMEHERE/temp_trash/

Once the above is done you can verify that the correct files have been moved out into the temp_trash folder:
ls /Volumes/DRIVENAMEHERE/temp_trash/

Now, you can “Put back” the remaining files in the Trash.

Please let me know if you have any questions about the above, or if my assumptions are incorrect.


I’m already able to put them back just fine from the Trash itself. My question is really: why is Odrive making all the duplicates, and why is it then throwing them out? And if it’s going to throw them out, can it at least throw out the duplicate copies (with the extra numbers in their filenames) instead of the originals?

I’m not sure what you mean by “for backup only”. I have my Google Drive linked, and I have all the files synced to my external.

We don’t do much testing against scenarios where odrive is put onto an external drive and the drive is regularly removed. It is possible there is some behavior happening there because of the removal. The reason I asked if it was for backup was because you stated that you were on a removable drive and removing it, which generally points to more of a backup scenario.

It is hard to say why a duplicate may be created. Are there any other applications or systems that are working against the same data, either on the same computer or on different computers? If you see any new duplicates being created, can you submit a diagnostic and then provide some details on the paths where the duplicates are seen?

I always quit Odrive before unplugging my external, which seemed like it would avoid any problems. Is there any reason putting my Odrive on an external would be a problem?

I use an external because my Google Drive is very large and my laptop’s hard drive is very small.

Nothing else is working with the same data—just Odrive. I was using it to organize my photos, but just by moving around the files in Odrive (in the Finder) and not using another program to edit or move them.

I’ll try opening Odrive again and see if it makes more duplicates.


Doing some filename legwork, it appears that Odrive didn’t ever delete all the copies of a file (thank goodness!). However, it did in effect rename tons and tons of files by adding these parenthetical numbers to the ends of filenames. I wrote a script to remove all the numbers, and things are syncing now. Fingers crossed!