Skip to content
Contents
GuidesOpenWrt

No zip command on OpenWrt? Create a ZIP with bsdtar and verify it with unzip

Extracting a ZIP file and creating one require different capabilities. Check the packages in your current feeds, then try a round trip with one small text file. If a computer needs to receive a standard ZIP, installing unzip alone does not provide the creation step on the router.

Look up the writer and reader for your architecture

Run these commands over SSH on the router. Check the release and package architecture, refresh the matching feeds and search for the exact package names. Resolve any index update errors first. An incomplete or stale index cannot establish that a package is unavailable.

ubus call system board
apk --print-arch
apk update
apk search -x zip
apk search -x unzip
apk search -x bsdtar

The official 25.12.0 x86_64 packages directory inspected here lists bsdtar and unzip but no package named zip. The old Info-ZIP writer was removed upstream. If your matching feeds offer bsdtar and unzip, preview the installation and check dependencies and free space before installing. If space is tight, transfer the files securely and create the ZIP on a computer.

apk add --simulate bsdtar unzip
df -h /

Create the archive, list it and read one member back

Once the preview looks right, run apk add bsdtar unzip. Create a fresh private directory on the router and check the free space in /tmp. The recording starts in an existing temporary directory. The commands operate only on the new sample.

umask 077
work=$(mktemp -d /tmp/zip-check.XXXXXX) && cd "$work" || exit 1

apk list --installed bsdtar unzip | cut -d' ' -f1
printf '%s\n' 'sample from OpenWrt' > note.txt
bsdtar -a -cf sample.zip note.txt
unzip -l sample.zip
unzip -p sample.zip note.txt > received.txt
cmp note.txt received.txt && echo 'payload matches'

The OpenWrt guest lists the ZIP member and compares the extracted bytes with the original.

On the OpenWrt 25.12.6 x86/64 guest, bsdtar 3.8.1-r2 selected the format from the .zip suffix. With unzip 6.0-r9 the listing showed note.txt, and cmp confirmed identical contents. If a member is missing, check its full path and case in the listing. If the writer rejects the format, check that the command is bsdtar and that its build supports ZIP. Test the copy on the receiving computer as well.

After testing, clean up the temporary files created for this run. If you installed the tools just for the test, preview their removal before deciding whether to uninstall. Do not unpack an IPK from an old release over the current system.

Move from opkg to apk on OpenWrt 25.12

Explore hardware

Comments