Skip to content

Advanced usage

ExistingPerson edited this page Dec 12, 2025 · 4 revisions

Take your package management further with these advanced features:

Exporting Packages

Export all installed packages to a config file:

better-pkg setup-export @c-all

Export by category:

better-pkg setup-export @c-media

Importing Packages

Install packages from a previously exported config:

better-pkg setup-custom packages_export.json

You can learn more about importing and exporting in Using setups section.

Removing Packages from Config

Remove packages listed in a config file:

better-pkg setup-remove packages_export.json

Working with Aliases

Use predefined aliases for groups of packages:

better-pkg install @a-editors

You can define your aliases in ~/.config/better-tools/pkg.json

JSON Output

Get output in JSON format for scripting:

better-pkg list --json
better-pkg search firefox --json

Non-interactive Mode

Use -y to automatically answer "yes" to prompts:

better-pkg install firefox -y

And if you want true non-interactive mode, this will automatically choose first search result:

better-pkg install firefox -yf

Clone this wiki locally