I am new in Raspberry Pi. I want to ask that I have downloaded RaspAnd for Raspberry Pi but its size (7.9GB) is greater than my SD Card size(7.21). I have checked that the .img file has four partitions from one is for storage which has 5.9GB storage. I want to reduce it to 5.0GB so I can write my Image to my SD card, so how can I reduce that specific partition size?

  • 1
    The only way I can think of is to install the image, resize the partitions on the SD card and then make a new img file. And easy way, buy a 16GB SD card. – MatsK Sep 3 '17 at 12:10

You may want to try this script https://github.com/Drewsif/PiShrink. It mounts the image file, resizes its partitions and truncates the file afterwards. You have to run it on a linux machine with enough space.

If you want a simpler solution. Use some tool to overwrite unused space on the SD card with zero and then you can simply compress the image efficiently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.