# Drewsif/PiShrink

Make your pi images smaller!

Repository: https://github.com/Drewsif/PiShrink
Canonical: https://ross.abutalabs.com/products/pishrink
Language: Shell
License: MIT
License Family: permissive
Topics: raspberry-pi, raspberrypi, shell-script, sd-card, pi-image
Last push: 2026-05-10T09:43:54+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 81, release rhythm 75, longevity 100
- inputs: {"age_days": 3795, "days_push": 115, "days_rel": 170, "gap_med": 13, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4102, forks 696 (observed 2026-08-28T04:08:35.575815+00:00)

## What it is
PiShrink is a bash script that automatically shrinks Raspberry Pi disk images so they flash faster and compress better. Shrunk images can optionally be compressed with gzip or xz, including parallel compression across multiple cores.

## Use cases
- shrink a raspberry pi img file before flashing to sd card
- compress pi images with xz or gzip for distribution
- make raspberry pi backups smaller
- reduce sd card image write time
- shrink disk image last ext4 partition
- prepare pi image that auto-expands on first boot

## When to choose
- you work with Raspberry Pi (or similar) .img files and want smaller, faster-to-flash images
- you need gzip/xz compression of disk images, optionally in parallel
- you want images that auto-resize the filesystem to fill the SD card on first boot

## When to avoid
- the last partition of your image is not ext2/ext3/ext4
- you need to shrink images on Windows or macOS without a Linux environment
- your image's last partition is not the root filesystem and you rely on auto-resizing

## Facets
- artifact type: cli-tool
- maturity: active
- function: compression, file-system, cli
- domain: developer-tools, embedded-systems
- platform: cli
- tags: raspberry-pi, sd-card, disk-images, shell-script, image-shrinking, command-line, linux

## Member repositories
- Drewsif/PiShrink (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:35.575815+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:15.850806+00:00, confidence not recorded.
  - readme: https://github.com/Drewsif/PiShrink (fetched 2026-08-28T04:08:35.575815+00:00, sha 4359f55ab005)
- Data as of 2026-08-30T08:39:29.467469+00:00.
