Unnecessary PlatformIO system data?

While updating one of my ESP8266 devices I saw the following message in the log:

We found 1.16MB of unnecessary PlatformIO system data (temporary files, unnecessary packages, etc.).
Use pio system prune --dry-run to list them or pio system prune to save disk space.

Searching for this message gives links to running command line inputs to solve this.

https://docs.platformio.org/en/latest/core/userguide/system/cmd_prune.html
It however is unclear to me how I can access this command line interface.
I suppose this has to be run locally on the ESP8266 device, but how?
Or can this be done through the HA web interface using the “Clean Build Files” option like this:

ESPHome_CleanBuildFiles

If not, then what is this “Clean Build Files” option meant for?

The command line runs on your computer, not the esphome device.

Sorry, but I don’t understand what you mean.
The message is about unnecessary system data on the HA server, and not on the ESP8266 device?
I tried to run the “pio” command through the HA Terminal interface in the browser, but got this reply:

So which command line interface should I use?

The command line interface in the ESPHome container. Use portainer to get there.

Ah, thanks!
Something new for me again: Portainer.
I did some searching about it, and as I now understand it, Portainer is a community addon for HA to manage the installed docker containers through a web interface.
Just to be clear: I am using a Home Assistant Supervised installation on a x86 system.
On the Portainer GitHub page it is stated that:

“Home Assistant DOES NOT SUPPORT running third party containers on Home Assistant OS or Supervised installation types. Ignoring this, will render your system as unsupported!”

So would installing the Portainer addon make my installation unsupported?

And another question: up to now I did not find any example of using Portainer to access a command line interface. Is this done through the Portainer web interface?

No HA add-on makes your device unsupported. That is why it are add-ons

Yes

Hmm…
So does this mean that the Portainer add-on (and also the ESPHome add-on for that matter) is NOT a “third party container”? Otherwise I really do not understand that warning statement on the Portainer GitHub page.

Third party containers = regular docker containers

Add-ons are considered part of the HA OS / HA Supervised eco-system.

You can use the portainer add-on to install regular docker containers on HA OS → that is not supported (but possible)

OK, thanks again Francis. All clear now again :slightly_smiling_face:
I will install the Portainer add-on probably later today and have a look at the possibilities.

You could also use the commandline above and type into it

docker ps|grep esphome
docker exec -it containername bash

The first command will give you containername

Thanks Nick!
That worked :slightly_smiling_face:

Although, at the first try to run the grep command I got a warning that the SSH add-on was running in Protection mode:

HA_Terminal_docker_protectionmode_20211014-2150

But after temporarily disabling this, I could successfully run the prune command in the ESPHome docker container:


So 1.16MB of cached data space reclaimed :slightly_smiling_face:

Ah yes!
Re-reading this conversation, I am still curious about what this “Clean Build Files” option in the ESPHome web interface does (see my initial message), since it did not solve the “prune” problem.
I cannot find anything about this on the ESPHome pages.
Anybody?

I am not an expert in platformio, but the clean build removes the whole build tree for that device and recompiles from scratch.

Thanks again Nick.
I tried it, and can confirm that, after running the Clean Build Files” action, ESPHome did a compilation from scratch: the compilation took much more time than normally when doing a small update of an ESP8266 device.