Using `--with-all-packages` with pio pkg install

Hi, I’m currently using the --with-all-packages option with pio platform install for dependency caching. I am aware that pio platform install is deprecated and will be removed in future releases. Is there an equivalent flag to use with the newer pio pkg install command? Thanks.

CC @ivankravets since I don’t see this option being implemented in platformio-core/install.py at develop · platformio/platformio-core · GitHub

1 Like

What is the reason for --with-all-packages?

Well, the original reason was: I thought that the package manager didn’t install required packages for a platform. I was attempting to use this flag to force-install all of the available packages.

The reason I thought that the package manager wasn’t installing the required packages: I am using the --storage-dir option, combined with -p for a platform. However, pio pkg install will ignore the --storage-dir option for all of the subsequent required packages it finds for a platform, installing them instead to the default global package location.

For example, running pio pkg install -f --storage-dir /path/to/cache -p example-platform results in the example-platform being installed to /path/to/cache, while its required packages are installed to ~/.platformio/packages. I’m pretty sure this is a bug. I would think that the platform and all required packages should be installed to the specified storage-dir. If so, I can open an issue in GitHub and take a look at it to see if it’s an easy fix.

This is not a bug. Tools and dev-platforms are located in different locations. See

What I could recommend:

  1. Create a dummy PIO project with overridden “dir” options
  2. Use it as a “template” to install dependencies to custom locations.
1 Like

Thanks for the helpful feedback!