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, 2017 at 12:10

2 Answers 2


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.


OK. To be helpful. IBEX is a Windows exe file. Using IBEX you load the image (from win32DiskImager or something like that), then resize the image, then you can write it back to the SD card. If you are only chopping a few megs off the end (the situation this questioner was asking about) you don't have to get precious about partition sizes etc.

If you google "IBEX image file size changer" you will get several links that point at the page where you download it from. It has a help screen.

I don't think this needs any clarification ....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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