`pkgx --update`
Author: felipecrsCreated Apr 29, 2026Updated Apr 29, 2026
pkgx does not provide a way to update already cached pkgs.
For example:
# prune cache
$ rm -rf ~/.pkgx
# cache an old version
$ pkgx [email protected]
# reuses the cached version
$ pkgx jq
# reuses the cached version
$ pkgx jq@1Except that, if you pass @latest, then it will update the cached pkg:
# downloads a newer version, like 1.8
$ pkgx jq@latestHowever, not always I want the actual latest version. Sometimes I just want the latest version within a range, like @1.
It would be great if the --update flag from v1 was brought back so that:
# prune cache
$ rm -rf ~/.pkgx
# cache an old version
$ pkgx [email protected]
# reuses the cached version
$ pkgx jq@1
# finds and use the latest jq@1
$ pkgx --update jq@1I would use this feature in my dotfiles script that updates everything in my system.
What do you think?
Source: pkgxdev/pkgx