Skip to content

PlatformIO and Arduino download a full toolchain for every board you have tried

Each microcontroller platform brings its own compiler, SDK and tools, often hundreds of MB. Where PlatformIO and Arduino keep them, and how to prune.

4 min read

Trying an ESP32 one weekend and a Raspberry Pi Pico the next leaves two complete toolchains on your Mac. PlatformIO and the Arduino IDE both keep every platform, compiler and framework you have installed.

du -sh ~/.platformio ~/.platformio/* 2>/dev/null | sort -h
du -sh ~/Library/Arduino15 ~/Library/Arduino15/packages/* 2>/dev/null | sort -h
du -sh ~/Documents/Arduino/libraries 2>/dev/null

PlatformIO

pio system prune --dry-run
pio system prune

# Remove a platform you no longer use
pio pkg list -g
pio pkg uninstall -g -p espressif32

Project build folders, .pio inside each project, can also be deleted; they rebuild.

Arduino IDE

Remove board packages from Tools, Board, Boards Manager. Libraries you no longer use can be removed in Library Manager, or deleted from ~/Documents/Arduino/libraries.

More toolchains: cross compilers.

Related: ESP-IDF taking up space on Mac.

Common questions

Where does PlatformIO store toolchains on a Mac?

In ~/.platformio, in the packages and platforms folders.

How do I clean up PlatformIO?

Run pio system prune to remove unused packages and caches, and uninstall platforms you no longer use.

Where does the Arduino IDE store board packages on a Mac?

In ~/Library/Arduino15/packages. Remove unused ones from the Boards Manager.

Read next