Uninstall upgraded packages

I just started using OpenWrt and after few days I found the Software/Updates tab and upgraded some packages. Later I learned that it will not remove the old version as they are in the ROM and I have very little free disk space now. How to downgrade the updated packages?

I found this script:

#!/bin/sh
FLASH_TIME="$(awk '
$1 == "Installed-Time:" && ($2 < OLDEST || OLDEST=="") {
  OLDEST=$2
}
END {
  print OLDEST
}
' /usr/lib/opkg/status)"

awk -v FT="$FLASH_TIME" '
$1 == "Package:" {
  PKG=$2
  USR=""
}
$1 == "Status:" && $3 ~ "user" {
  USR=1
}
$1 == "Installed-Time:" && USR && $2 != FT {
  print PKG
}
' /usr/lib/opkg/status | sort

and it does list the packages that I most likely upgraded:

luci
luci-app-firewall
luci-app-opkg
luci-base
luci-lib-ip
luci-lib-jsonc
luci-lib-nixio
luci-mod-admin-full
luci-mod-network
luci-mod-status
luci-mod-system
luci-proto-ipv6
luci-proto-ppp
luci-theme-bootstrap

These are 100% match:
opkg list-installed | grep 'git-20.287'

luci - git-20.287.57033-3d52019-1
luci-app-firewall - git-20.287.57033-3d52019-1
luci-app-opkg - git-20.287.57033-3d52019-1
luci-base - git-20.287.57033-3d52019-1
luci-lib-ip - git-20.287.57033-3d52019-1
luci-lib-jsonc - git-20.287.57033-3d52019-1
luci-lib-nixio - git-20.287.57033-3d52019-1
luci-mod-admin-full - git-20.287.57033-3d52019-1
luci-mod-network - git-20.287.57033-3d52019-1
luci-mod-status - git-20.287.57033-3d52019-1
luci-mod-system - git-20.287.57033-3d52019-1
luci-proto-ipv6 - git-20.287.57033-3d52019-1
luci-proto-ppp - git-20.287.57033-3d52019-1
luci-theme-bootstrap - git-20.287.57033-3d52019-1

Should I just uninstall them? And then the original ones will be back in use?

I resolved it by doing this

4 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.