Huge 1.3 GB esp32 espressif .pack file: is this normal?

I was surveying Arduino IDE support files on my hard drive and came across this huge 1.3 GB file:
Name: pack-c95b443da221215c41a68d3bdc94a4d58946c60d.pack
Type: Pack200 Java archive (application/x-java-pack200)
File Path: /home/ed/Arduino/ESP32 Misc Files/hardware/espressif/esp32/.git/objects/pack

Is this normal size-wise for this type of file?

welcome my friend
It is possible that it contained an additional copy of the codes and libraries

Yes. Git repositories can get really huge when the developers make the poor choice of checking in large binaries. The reason is that the Git repository has to contain the entire history of the project. With text files, the diff on each revision is small, and it is only that diff data that needs to be stored. But with binaries, the diff from even a minor change can be huge.

If you don't need the entire history of the repository, you can avoid it by doing a shallow clone:

git clone --depth 1

But better yet if you aren't doing any beta testing or development then you should just use the Arduino Boards Manager to install the platform. That provides only the platform itself, without the added overhead of the Git repository.

After reinstalling the IDE way back when the Board Manager has never linked up correctly for the ESP32. If I type ESP in the Boards Manager nothing shows up. So now I use the ESP32 Arduino (in sketchbook) link.

So if I type in "git clone --depth 1" in terminal mode will it reference the .pack file and reduce it or do I need to do something else as well?

You probably forgot to add the URL in the "Additional Boards Manager URLs" preference in the Arduino IDE:

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-boards-manager

No. You would add that flag to the git clone command during the installation:

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#linux

The shallow clone would be done to avoid the huge download during the installation. You already did that.

If you want to clean it up now, you could just delete the /home/ed/Arduino/ESP32 Misc Files/hardware/espressif/esp32/.git folder. The Arduino IDE doesn't use that folder for anything. It is only for storing the development history of the project.

Of course, if you delete the .git folder, then you would not be able to do a git pull to pull in the new changes that have been made to the project.

" You probably forgot to add the URL in the "Additional Boards Manager URLs " preference in the Arduino IDE:"
Nope, its in there but discovered it is present TWICE and with no "," spacer. Lol.... shakes head...

So delete the .git folder and then to re-establish the folder:

git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \

But that does not include the "--depth 1" part from what I can see.

No need to re-establish it. As I said already, the IDE doesn't use it for anything.

If you still want the repository, you can just delete /home/ed/Arduino/ESP32 Misc Files/hardware/espressif/esp32 and then do a shallow clone to replace it.

There is probably some Git command that would do that more efficiently, but it's not something I know offhand.

Yes, as you noticed, the official instructions do a full clone of the repository. That makes sense because only developers and beta testers are supposed to be using those instructions. Developers and beta testers may want the full repository history so that they can investigate the commit history to find the reason for a given change (e.g., git blame) or bisect a regression. You can't do those things with a shallow clone because the shallow clone is missing all the revision history.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.