I have two disk images, compressed with the xz algorithm and shrunk using the PiShrink tool, that are 669.5MB and 1.03GB respectively. The thing is, the smaller image was copied from the larger one and all I did to modify it was delete a few bash scripts/python scripts and add a couple new ones with less lines. I need both to be as small as possible for use in a production setting, but I can't for the life of me figure out what could be causing this discrepancy despite all of my sleuthing/comparison of the two.
Perhaps someone with a deeper knowledge of how the Pi handles storage/compression could shed some light on possible reasons for this? Or things I can try to pin down contributing factors?
I just looked at the size of all the folders on each disk image, using the same exact SD card, by running the following from '/':
du -s * | sort -nr
Comparing the outputs from both of the mounted images only shows a 1066 byte difference in size, across all the folders, between the larger and smaller disk images....
Where could this extra data be lurking? At the very least I need the second image to be under 1GB but even after deleting every excess script or tar I could find (that also exist on the smaller image?!?) it hasn't gotten below 1.02GB. Thank you for any and all information that might help me solve this mystery or easily reduce the larger image.
Context: I've been using Buster with my Rpi 3B+, copying and cloning mostly with the dd utility on MacOS or the SD Clone software from twocanoes. The micro SD card I've been using is a SanDisk Ultra 16GB, 10 A1.