ESPHome "Can not remove temporary directory"

I installed ESPHome v2023.3.0 and my ESP32’s lost contact with my wifi. I then restored the old version but my ESP32’s are still showing errors. When I tried to reinstall the yaml file to the ESP32 (in case that was part of the problem) I get the following error. I have not been able to find the temporary directory. I am using a PC with Win10 to configure the ESP32 so is the directory somewhere in the PC (I have tried searching for it without success)? Or is the directory somewhere on the Raspberry pi that is running the Home Assistant software?
Thank you for your help!

INFO Reading configuration /config/esphome/esp32-2.yaml…
INFO Generating C++ source…
INFO Compiling app…
Can not remove temporary directory /data/esp32-2/.pioenvs. Please remove it manually to avoid build issues
Processing esp32-2 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)

How did you install esphome on windows?

I’ve got HA Supervisor running in Docker on a Raspberry Pi.
I can see ESPHome is running in it’s own container, so I’m wondering if it might be easier to simply delete the container and start again. Any thoughts please?

You are making no sense.

Sorry for not being clear. I have HA Supervisor running in Docker on a Raspberry Pi and I can see ESPHome is running in it’s own container.
I am using a PC with Win10 to configure the ESP32 - I have it connected with a USB cable to the PC for the configuring, then once that is done I disconnect it from the PC and connect it to a power source and it connects to the Raspberry Pi via wifi.
I hope that clarifies things - please let me know if it isn’t.
Thanks!

Try flashing the esp plugged into the raspberry pi.

I am also facing the same issue. The issue is not with flashing but with compiling itself. Esphome is not able to compile the sketch. My issue was solved by uninstalling addon and then reinstalling it. By this way the temporary files are removed.

But stil not able to compile bcos of error sh: 1: xtensa-lx106-elf-g++: not found