How to shrink a Raspbian SD card
Software needed:
- Insert the SD card in your computer, open PARAGON Partition Manager Free and select "Partition Manager"
- Select the right edge of your SD card, and drag it all the way to the left.
- A popup will show you the minimum size you can shrink the SD.
- Modify that number so you add some free space to the partition and click "OK"
- Click "Apply" and then "Yes"
- This will take a few minutes depending on the size of the SD.
- You will be notified when the process is finished.
- This is exactly how you want the SD to be. Shrunk down with some free space. The rest of the SD is unallocated.
- Open Win32 Disk Imager and create an image of the SD. Its size will be the full size of your SD (eg. 16GB)
- Run "gdisk64.exe -l big_image.img" and write down the "End" sector of the "Linux filesystem" partition.
- Run "ddrelease64.exe --progress if="big_image.img" of="small_image.img" bs=512 count=3665919".
- Notice the size difference after shrinking the image.
There you go! :)