PlatformIO Community

Duplicate library in .piolibdeps


My project depends on a Logging library via GitHub URL ( The same Logging library is listed as a dependency (in library.json) of another dependency (

After running, .piolibdeps contains both

  • Arduino Logging Library
  • Arduino Logging Library@src-1bbdf865e74caf45af3bb1f170c67c92

It used to have both “Arduino-logging-library” and “Arduino Logging Library”. I thought adding a would fix that, but it just changed it to this new situation.

I have looked in the forum and documentation and do not see an explanation.

Why are there two copies of the library? What is making the library manager think it needs a separate copy?



It happened to me some rare times, had you try to delete in your project the .piolibdeps hidden folder?


Yeah, it’s very stable. If I delete .piolibdeps it just rebuilds the directory with both copies of the dependency.

I ran pio run --verbose and see that it is something about installing the same library with two names.

Installing dependencies
LibraryManager: Installing Arduino Logging Library
Arduino Logging Library @ f5d5815 is already installed
LibraryManager: Installing arduino-logging-library
Arduino Logging Library @ f5d5815 is already installed

Looking further into the code in (the only place where I found the string “@src-”) I see that it is resolving package identity looking at the version string (which makes sense). Looking more closely at my platformio.ini file and the library.json file of my dependency, I noticed that the git URL’s were different.

library.json has:

  "name": "Arduino Logging Library",
  "version": "",

whereas platformio.ini has

lib_deps =

I fixed the problem by adding “.git” to the URL in platformio.ini.