WindowsmacOSLinux

Where Are PlatformIO Core Files Stored?

PlatformIO stores cores, platforms and packages in a central core directory. Projects stay wherever you create them and are marked by platformio.ini.

Last updated

PlatformIO Core keeps installed platforms, toolchains, frameworks and global libraries outside your project. The default location is a .platformio folder in your home directory. It can be moved with the PLATFORMIO_CORE_DIR environment variable or the core dir option.

A PlatformIO project can live in any folder you choose. The project root holds platformio.ini plus src, lib, include and test folders. Build output goes under .pio in that project folder.

Where PlatformIO stores this, by platform

Windows
C:\Users\<username>\.platformio

Default core directory. <username> stands for your Windows login name. Contains platforms, packages, lib and cache subfolders. A project folder itself can be anywhere and holds platformio.ini.

macOS
/Users/<username>/.platformio

Default core directory. <username> stands for your macOS login name. Contains platforms, packages, lib and cache subfolders. A project folder itself can be anywhere and holds platformio.ini.

Linux
/home/<username>/.platformio

Default core directory. <username> stands for your Linux login name. Contains platforms, packages, lib and cache subfolders. A project folder itself can be anywhere and holds platformio.ini.

Frequently asked questions

How do I change the PlatformIO core location?

Set PLATFORMIO_CORE_DIR to the desired folder before installing or running PlatformIO, or set core dir in the platformio section of platformio.ini. Reinstall cores after moving it so packages resolve to the new path.

What identifies a PlatformIO project folder?

The presence of platformio.ini in the folder root. Keep that file with src and lib in version control. The .pio build folder inside the project can be deleted and rebuilt.

Notice an outdated path? Let us know.