apk in OpenWrt 25.12: the package manager that replaced opkg
In one sentence
Section titled “In one sentence”Starting with 25.12, OpenWrt installs and removes software with apk (Alpine Package Keeper, version 3). 24.10 and earlier still use opkg.
Why it changed
Section titled “Why it changed”The 25.12.0 announcement explains that OpenWrt’s fork of opkg is no longer maintained. Few package names changed, but every command did.
Command map
Section titled “Command map”| Task | apk (25.12) | opkg (24.10) |
|---|---|---|
| Refresh the package index | apk update |
opkg update |
| Install | apk add <pkg> |
opkg install <pkg> |
| Remove | apk del <pkg> |
opkg remove <pkg> |
| List installed | apk list --installed |
opkg list-installed |
| List upgradable | apk list --upgradeable |
opkg list-upgradable |
| Which package owns a file | apk info --who-owns <file> |
opkg search <file> |
What else is different
Section titled “What else is different”- Package files use the
.apkextension, and the package index ispackages.adb. - Repositories are listed under
/etc/apk/repositories.d/. - Packages you build yourself are unsigned, so installing them needs
--allow-untrusted.
Watch out
Section titled “Watch out”- Don’t use
apk upgradeto upgrade the system. The OpenWrt wiki warns against it. Upgrade firmware with an attended sysupgrade client instead: the LuCI app is installed by default on 25.12. - Don’t paste opkg commands into 25.12, or apk commands into 24.10. Check which one you have first.
See it on your router
Section titled “See it on your router”apk list --installed | headls /etc/apk/repositories.d/Related guides
Section titled “Related guides”Sources
Router.Homes
Independent OpenWrt notes. Every page states the firmware, device, package manager and way back.
Icons: Solar by 480 Design, CC BY 4.0