How to import cores already installed in the Arduino IDE?


I have several cores in the Arduino IDE, such as ESP32, STM32, there are several GB of data, how can I use these same cores without having to download them again and having the cores duplicated on the computer?

I found the lib_extra_dirs variable, but how to do it for cores?

Ref.: Moving (Complex?) portable arduino setup to PlatformIO - #2 by cakira