apx-stacks
Manage declarative stacks using APX package manager
TLDR
Interactively create a new stack configuration
Interactively update a stack configuration
List all available stack configurations
Remove a specified stack configuration
Import a stack configuration
Export the stack configuration (Note: The output flag is optional, it is exported to the current working directory by default)
SYNOPSIS
apx stacks [SUBCOMMAND] [OPTIONS]
Subcommands:
apx stacks list [OPTIONS]
apx stacks delete STACK_ID [OPTIONS]
apx stacks prune [OPTIONS]
PARAMETERS
list
Displays a list of all currently available `apx` stacks, including their IDs, sizes, and creation dates.
delete STACK_ID
Deletes the specified `apx` stack. The `STACK_ID` can be the full unique identifier or a unique prefix of the stack ID.
prune
Removes all unused, dangling, or unreferenced `apx` stacks, freeing up disk space.
--all
Used with `list` to show all stack layers and details. Used with `prune` to process all relevant stacks.
--force or -f
Forces a stack deletion or pruning operation without prompting for confirmation.
--verbose or -v
Increases the verbosity of the output, providing more detailed information about the operations being performed.
--help
Displays a help message for the `apx stacks` command or its specific subcommand.
DESCRIPTION
The `apx stacks` command is a subcommand of the experimental `apx` utility, developed by Canonical for running applications within isolated environments. While `apx` focuses on creating and managing these ephemeral environments, `apx stacks` is specifically designed to manage the underlying 'stacks' or images upon which these environments are built.
These stacks are read-only filesystem layers that serve as the base for isolated `apx` sessions. `apx stacks` allows users to list all available image stacks, delete specific ones that are no longer needed, and prune unused or dangling stacks to reclaim valuable disk space. It's an essential tool for maintaining `apx` environments, especially in development or testing workflows where many temporary environments and their associated images might accumulate.
CAVEATS
The `apx` utility, including `apx stacks`, is an experimental project and is under active development. Its features, options, and behavior might change in future versions. It relies on `systemd-nspawn` for containerization, which may not be available or fully supported on all Linux distributions.
UNDERSTANDING STACKS
In the context of `apx`, a 'stack' refers to a layered, read-only filesystem image from which ephemeral isolated environments are created. These are similar in concept to Docker images, providing a consistent and reproducible base for running applications.
DISK SPACE MANAGEMENT
Regular use of `apx stacks prune` is highly recommended to manage disk space effectively. As `apx` environments are frequently created and destroyed, unused image layers can accumulate rapidly, consuming significant storage.
HISTORY
`apx` was developed by Canonical, the creators of Ubuntu, as a modern command-line tool to simplify the management of isolated environments, particularly for development and testing related to snap packages and Debian packages. `apx stacks` emerged as a core component of `apx` to manage the underlying immutable images that make these isolated environments possible, reflecting a common pattern in container technology for efficient resource management.
SEE ALSO
apx(1), systemd-nspawn(1), chroot(1), docker(1), lxc(1)