I have just re-installed Arduino IDE on my crashed computer. But I want to restore my Arduino Sketches and Libraries, I see the Libraries are on various places
Such as:
c:\Programme files (x86)\arduino
c:\Users\AppData\Local\Arduino15\BlaBlaBla.....
d:\Data\Arduino (This is where I save my-sketches)
I use WIN-10 and Arduino IDE 1.8.9
I find this rather messy; especially I get alsorts of messages mentionning duplicate libraries.
Now my question:
What is the best place to store all libraries?
Standard Arduino libraries are in the installation directory. That's the first directory that you mention.
Anything you install yourself (3rd part stuff) goes in the libraries directory under the main sketch directory. That is the third directory that you mention
Not sure about the second one; might be for other boards or an upgrade/downgrade of the board manager.
The libraries you find under c:\Users\AppData\Local\Arduino15\packages are bundled with the hardware cores. These are architecture-specific libraries that will be accessible only when a board of that hardware core is selected from the Arduino IDE's Tools > Board menu. For example, the SPI library is architecture specific so every hardware core will bundle its own version of the SPI library. All the libraries have the same API so you won't notice that you're using a different library from one board to another, but there's no way the SPI library for Arduino AVR Boards could work for Arduino SAMD Boards.
You should definitely not store your own libraries in c:\Users\AppData\Local\Arduino15\packages.