A local file supplies one package. apk can still consult repositories for dependencies and trust information. Point this transaction at a local index and request the package by name.
Back up and prepare an empty directory over SSH
df -k / /tmp
mkdir -m 700 /tmp/offline
Check writable and temporary space. If the directory exists, choose a fresh one and adjust every path below. On a connected computer, download all three files from the same directory below. Keep their names and transfer them to /tmp/offline using SCP or SFTP. For other builds, check ubus call system board and use matching files.
OpenWrt 25.12.6 · x86/64 · packages
packages.adbzstd-1.5.7-r1.apklibzstd-1.5.7-r1.apk
Simulate before installing
ls -l /tmp/offline
echo /tmp/offline/packages.adb > /tmp/offline/repos
apk --no-network --repositories-file /tmp/offline/repos add --simulate zstd
In an offline OpenWrt 25.12.6 x86/64 VM, passing the file directly returned UNTRUSTED signature. Using the matching official index listed zstd and libzstd. The screenshot uses /tmp and /tmp/repos directly. Stop on signature errors and verify the source. Keep verification enabled. Fetch missing dependencies from the same build. A plan can succeed even when an archive is missing.

Install only after checking the plan and files, then test a round trip
apk --no-network --repositories-file /tmp/offline/repos add zstd
zstd --version
printf test | zstd -q | zstd -dq
echo
Check for installation errors, version 1.5.7 and the final word test. Repository options apply only to this command. After a failure, inspect what actually changed. If zstd was newly added and is no longer needed, simulate removal first. Run apk --no-network --repositories-file /tmp/offline/repos del zstd only if other services are unaffected. Keep required libraries and remove only your temporary files.
Stop here to keep the program. The command below only previews removal. If the shell still shows the old path after actual removal, run hash -r to clear its command cache and check the file and package record.
apk --no-network --repositories-file /tmp/offline/repos del --simulate zstd
OpenWrt apk says “breaks: world”. Where did the requested version come from?
Comments