I am used to sudo dnf upgrade (previously sudo yum update)
I suspect that I am doing this wrong. Currently:
opkg update
opkg list-upgradable
opkg upgrade (type list of packages from previous query)
Is there an easier way to do all of this? Pipes don't work because the package list requires escapes around the spaces. Moreover, should I be doing this in the first place?
You can upgrade vanilla packages (like nano, mwan3, htop) that have no relevance to the core functionality.
You should not update core system packets (procd, ubox, ubus etc.) as doing that may break things pretty badly. And may even prevent you from re-installing things easily.
And note that as you can't delete those package files that are in the originally flashed firmware, upgrading those packages will consume double flash space (as you will have both the new version and old version files there).
opkg in Openwrt/LEDE is meant for lightweight package installation, but the core functionality is not the mass update of all packages. The system is not built for that.
If you want to update core packages, the easiest method is to flash a new firmware that includes those.
Adding to what @hnyman said, you could also compile your own firmware, which I always recommend, as it's the most convenient since your own config files and packages are included within it.
Compiling is fairly straight forward and I created a script for Ubuntu that auto sets up the buildroot, so the only thing you'd need to manually do is add the toolchain to your PATH in your bashrc, add the STAGING DIR variable, and export it.
You can use the following command to install all available upgrades: opkg update && opkg list-upgradable | awk -F ' - ' '{print $1}' | xargs opkg upgrade
But as others mentioned before, you should probably not do this.