APK script to update only packages installed manually

Hi All,

when opkg was a thing in openwrt i had a script wihch would update all packages which where installed manually (whole in overlay in my uderstanding). As updating all packages may lead to bricking the router i would like ask if someone already has something similiar for apk?

Yes, it is called owut

apk add owut
owut check -v
owut download -v
1 Like

O NOT USE apk upgrade to update your packages!

Doing so will sooner or later brick your device. Several packages have various missing conflicts, incomplete dependencies or are otherwise specified incorrectly, which will cause a misconfiguration if you blindly upgrade them (hostapd-*, wpad-*, ucode-mod-*, various libraries and others).

The safe way to upgrade all packages is to use one of the ASU clients: LuCI Attended Sysupgrade, owut or Firmware Selector.

from: https://openwrt.org/docs/guide-user/additional-software/opkg-to-apk-cheatsheet

Thank you for your reply.

when i do owut check -v i get list of packages which has an update. But those packages are system (ROM) packages like luci or luci-base which are not additionally installed packages by me. In the pas it was said somehwere in the forum that it is relatively safe to update only packages which you installed by yourself using opkg. Now when apk in in place are you saying that using owut to update system (ROM) packages is safe? Will owut also list manually installed pakcages if there will be update for it?

This is why I was asking for something that updates only packages which i installed manually. Are you saying that updating even ONLY manually installed packages using apk is wrong approach?

You can run your own sysupgrade server. OpenWrt infrastructure will not service strangely sourced packages. Esp if you even can not name them.

I am a bit lost here. So packages installed using apk are now considered strangely sourced? I have installed them not having my own sysupragde server but using apk update and then apk add package_name.

No, that has never been safe, irrespective of opkg or apk. Those package still might suck in a dependency with an ABI change that is incompatible with packages that are not upgraded, and will brick your device. Currently the only safe way to update packages is to do a full firmware upgrade.

2 Likes