how to organize libraries (especially esp32)

Hello,
I am programming several different boards in the Arduino IDE (straight Arduino, ESP8266 and lately ESP32). It is easy enough to prepare the IDE for the various boards and to select them. But then, you need several additional libraries for, e.g. wifi or IR, and then I get confused.

I use Linux, and the Arduino libraries sit in $HOME/Arduino/libraries.

Now I want to use a ESP32 board and write a program that accesses Wifi. On Github I find
espressif/arduino-esp32. I download the zipfile. The library manager of th Arduino IDE will not unzip it. So I and unpack it by hand, noting that except the Wifi library it also has a ArduinoOTA library etc. which I will also need plus a lot of stuff that I am not familiar with.

Do I now just 'cp -r SomeLibrary ~/Arduino/libraries'? Or do I copy them to '~/Arduino/hardware/espressif/esp32'. I'd rather not just try it as I am afraid to make a mess and lose the libraries for the other boards such as esp8266, which work perfectly.

Some guidance, and if possible explanation would be much appreciated.

Paai

espressif/arduino-esp32 is not a library. it is a board package. on the GitHub page is how to install it with Boards Manager