#43094·bun

Listing global packages shouldn't require a package manifest

Author: jassielofCreated Sep 17, 2026Updated Sep 17, 2026

bun list --global or bun pm ls --global require a package manifest when there are no globally installed packages, it works fine when there're packages installed. It should just say so. As well there's no clear flag that shows that bun list --global exists anywhere.

bun pm ls --help

Usage: bun pm [flags] [<command>]

  Run package manager utilities.


Commands:

  bun pm scan                 scan all packages in lockfile for security vulnerabilities
  bun pm pack                 create a tarball of the current workspace
  ├ --dry-run                 do everything except for writing the tarball to disk
  ├ --destination             the directory the tarball will be saved in
  ├ --filename                the name of the tarball
  ├ --ignore-scripts          don't run pre/postpack and prepare scripts
  ├ --gzip-level              specify a custom compression level for gzip (0-9, default is 9)
  └ --quiet                   only output the tarball filename
  bun pm bin                  print the path to bin folder
  └ -g                        print the global path to bin folder
  bun pm ls                   list the dependency tree according to the current lockfile
  ├ --all                     list the entire dependency tree according to the current lockfile
  └ --trusted                 list only trusted dependencies
  bun pm why <pkg>            show dependency tree explaining why a package is installed
  bun pm licenses             list installed packages grouped by license
  ├ --json                    output as JSON
  ├ --prod                    omit devDependencies
  ├ --dev                     list only what devDependencies pull in
  ├ --long                    also print author, description and homepage
  └ --filter <pattern>        list only the matching workspaces' dependencies
  bun pm whoami               print the current npm username
  bun pm view name[@version]  view package metadata from the registry (use `bun info` instead)
  bun pm version [increment]  bump the version in package.json and create a git tag
  └ increment                 patch, minor, major, prepatch, preminor, premajor, prerelease, from-git, or a specific version
  bun pm pkg                  manage data in package.json
  ├ get [key ...]
  ├ set key=value ...
  ├ delete key ...
  └ fix                       auto-correct common package.json errors
  bun pm hash                 generate & print the hash of the current lockfile
  bun pm hash-string          print the string used to hash the lockfile
  bun pm hash-print           print the hash stored in the current lockfile
  bun pm cache                print the path to the cache folder
  bun pm cache rm             clear the cache
  bun pm migrate              migrate another package manager's lockfile without installing anything
  bun pm untrusted            print current untrusted dependencies with scripts
  bun pm trust names ...      run scripts for untrusted dependencies and add to `trustedDependencies`
  └  --all                    trust all untrusted dependencies
  bun pm default-trusted      print the default trusted dependencies list

Learn more about these at https://bun.com/docs/cli/pm.

Nor that page provides any info that a global flag is valid.

I'm using 1.4.2 on Windows 11.