Upgrade all OpenWRT packages with a single line command

Share on FacebookTweet about this on TwitterShare on Google+

opkg list-upgradable | awk -F ' - ' '{print $1}' | xargs opkg upgrade

Tagged , , ,

5 thoughts on “Upgrade all OpenWRT packages with a single line command

  1. Bit Second says:

    The command does not work with Chaos Calmer.

    • aidvu says:

      Maybe awk and xargs are not installed, and you need to opkg install them first? Can you make a screenshot of the error shown and post it?

  2. Tester McTestington says:

    Worked for me thx bro.

  3. Mister Mister says:

    Thanks very much.
    Works like a charm.

  4. Made a little app for this if anyone is interested. On github:
    https://gist.github.com/tavinus/bf6dff1c11e7c9951b829b4e33eb6076

    My one-liner cents (just awk, no xargs):
    It is running ‘opkg update’ as well.

    opkg update >/dev/null; PACKS=”$(opkg list-upgradable | awk ‘{ printf “%s “,$1 }’)” && [[ ! -z “$PACKS” ]] && opkg install $PACKS || echo $’\nNo packages to install\n’

Leave a Reply

Your email address will not be published. Required fields are marked *