npkg
Manage the current Nix profile
Package Updates
Usage reference
Try an example
npkg add batSyntax
npkg <command> [args]- Availability
- Available when nix is installed
- Dependencies
- nix; jq and fzf 0.68.0+ for optional workflows
Some subcommands change stored data or packages. Check the selected operation before running.
Features & Examples
Examples appear only where they add useful detail.
add [pkg ...]Add package(s); with no args opens an fzf pickerAlso known as: install [pkg ...]
Examplenpkg add batfind [query]Fuzzy-pick nixpkgs attribute names and add selections
Examplenpkg find nvimsearch <query>Run a plain nixpkgs search with descriptions
Examplenpkg search ripgreplistList packages in the current profile
remove [pkg ...]Remove package(s); with no args opens an fzf picker
outdatedCompare installed and evaluated Nix output identities
refreshRebuild the cached nixpkgs attribute index
upgrade [pkg ...]Upgrade all packages or only the named ones
helpShow this help text
| Usage | Description | Example |
|---|---|---|
| Add package(s); with no args opens an fzf pickerAlso known as: install [pkg ...] | |
| Fuzzy-pick nixpkgs attribute names and add selections | |
| Run a plain nixpkgs search with descriptions | |
| List packages in the current profile | No example documented |
| Remove package(s); with no args opens an fzf picker | No example documented |
| Compare installed and evaluated Nix output identities | No example documented |
| Rebuild the cached nixpkgs attribute index | No example documented |
| Upgrade all packages or only the named ones | No example documented |
| Show this help text | No example documented |
Notes
- Bare install names are expanded to nixpkgs#<name>
- npkg find searches a cached list of nixpkgs attribute names
- npkg refresh and outdated need jq
- Interactive add/find/remove needs jq and fzf 0.68.0+
- Advanced nix flags can be passed through by calling nix directly