#1267·pkgx

`pkgx --update`

Author: felipecrsCreated Apr 29, 2026Updated Apr 29, 2026

pkgx does not provide a way to update already cached pkgs.

For example:

bash
# prune cache
$ rm -rf ~/.pkgx

# cache an old version
$ pkgx [email protected]

# reuses the cached version
$ pkgx jq

# reuses the cached version
$ pkgx jq@1

Except that, if you pass @latest, then it will update the cached pkg:

bash
# downloads a newer version, like 1.8
$ pkgx jq@latest

However, 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:

bash
# 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@1

I would use this feature in my dotfiles script that updates everything in my system.

What do you think?