Skip to content
Contents
GuidesOpenWrt

Move from opkg to apk on OpenWrt 25.12

First read ubus call system board to check the actual package manager version.

First read ubus call system board to check the actual package manager version. The official 25.12 series switched to apk; earlier versions and derivative builds follow their own firmware guidelines. Software packages must match the system, architecture, and kmod kernel ABI.

Remember these a few common commands first

task opkg apk
refresh index opkg update apk update
install package opkg install tree apk add tree
remove package opkg remove tree apk del tree
check installed content opkg list-installed apk info

Identify whether you need a package change or a firmware upgrade

The 25.12.6 login comparison lists apk upgrade as upgrading all packages. It describes a package-manager operation. To move between complete OpenWrt releases, especially when changing the kernel, drivers or built-in packages, follow the device's firmware upgrade path. Replacing packages in bulk can exhaust writable storage and does not guarantee the new firmware's kernel or defaults.

Record the current system before choosing a path

ubus call system board
apk --print-arch
df -k /
apk list --installed

For one application, check its feed, free space and simulated install plan as described above. For a firmware upgrade, export the configuration and verify the revision, image, signature or checksum and recovery path before choosing the supported sysupgrade or Attended Sysupgrade procedure. After reboot check the board, release and wired management, then test the services you use. If a previous bulk package change left the system unstable, keep management access, save the configuration and errors, and follow the verified recovery procedure for the device.

Which home network services can you restore in ten minutes on a spare router?

Verify the repository and APK installation results on the device

First check the release version and repository URL, then use apk search to locate the package and apk info to verify its status. Install a trial component that can be uninstalled and read the logs.

Backup and record the packages you intend to install. Verify the target image and release notes before upgrading. If the update fails, first check the repository URL, signature, timestamp, available space, and ABI. Do not pass old binary packages to a new package manager. When recovering, use the previous verified image and configuration.

Command migration and full firmware upgrades are two distinct operations. To restore compatibility with the repository upon mismatch between packet and ABI, prevent mixing modules from different releases.

Use apk to inspect packages installed on the live router. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Check the terminal output
Use apk to inspect packages installed on the live router. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Use apk to inspect packages installed on the live router. · OpenWrt 25.12.6 x86/64 (QEMU/KVM). Open the original image

Lab record

An earlier GeeksMeta OpenWrt 25.12.6 x86/64 test. The LuCI Installed view shows tree 2.2.1-r2 installed from the matching official feed. The package can also be checked with apk info.

An earlier GeeksMeta OpenWrt 25.12.6 x86/64 test. The LuCI Installed view shows tree 2.2.1-r2 installed from the matching official feed. The package can also be checked with apk info.

Reference

Related guides

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments