LinuxCommandLibrary

apx

Install and manage applications on Alpine Linux

TLDR

View documentation for managing package managers

$ tldr apx pkgmanagers
copy

View documentation for managing stacks
$ tldr apx stacks
copy

View documentation for managing subsystems
$ tldr apx subsystems
copy

SYNOPSIS

apx [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS] [ARGUMENTS...]

Common Commands:
apx install <package_name> [DISTRO] [VERSION]
apx remove <package_name>
apx enter <application_name>
apx list
apx search <package_name>
apx init
apx shell [DISTRO] [VERSION]
apx update
apx cleanup
apx create <container_name> [DISTRO] [VERSION]

PARAMETERS

install
    Installs a specified package inside an apx container. Optionally, you can specify a DISTRO and VERSION for the container.

remove
    Uninstalls an application and its associated container.

enter
    Provides an interactive shell session within the container of a specific installed application.

list
    Displays a list of all applications currently managed by apx, along with their container details.

search
    Searches for available packages within the configured apx repositories.

init
    Initializes the apx environment, creating necessary configurations and base containers.

shell
    Opens a temporary shell session within a new or existing apx container, useful for quick tasks or debugging.

update
    Updates packages within all apx containers to their latest versions.

cleanup
    Removes unused container layers, images, and other temporary files to free up disk space.

create
    Allows creating a new, custom apx container with a specified distribution and version, useful for specialized development environments.

--help
    Displays a help message outlining available commands and options.

--version
    Shows the apx command version.

DESCRIPTION

apx is a command-line utility designed primarily for immutable Fedora operating systems like Fedora Silverblue, Kinoite, and Onyx. It enables users to install and manage applications within isolated OCI containers, leveraging technologies like Podman. Unlike traditional package managers that layer software directly onto the root filesystem, apx encapsulates applications and their dependencies within separate containerized environments. This approach maintains the immutability of the base system, reducing the risk of system corruption and simplifying rollbacks. apx aims to provide a seamless user experience, making containerized applications behave as if they were natively installed. It addresses the challenge of running software not available as Flatpaks or those requiring specific system libraries, by providing a declarative way to manage these applications, allowing users to define their desired software setup.

CAVEATS

apx primarily relies on Podman for containerization, meaning Podman must be installed and properly configured. While it offers excellent application isolation, each application or group of applications within a shared container adds to disk space usage. It is designed for immutable systems; on traditional Linux distributions, its benefits might be less pronounced compared to native package managers. Managing many isolated application containers can sometimes increase complexity for system administrators, although apx strives to simplify this for end-users. Unlike distrobox, apx is more focused on application management rather than full development environments, though it can be used for that purpose.

DECLARATIVE CONFIGURATION

apx emphasizes a declarative approach to application management. Users can define their desired application set, and apx ensures the system state matches this declaration, making setups reproducible and easier to manage across different machines or after system re-installations.

INTEGRATION WITH HOST SYSTEM

Applications installed via apx are typically integrated with the host desktop environment. This means they appear in application launchers, can open host files, and often share X11 or Wayland display sockets, providing a near-native user experience despite running within a container.

HISTORY

apx emerged from the needs of the Fedora Project's immutable desktop initiatives, specifically Fedora Silverblue and Kinoite. These distributions utilize OSTree for atomic updates, making direct layering of RPM packages undesirable. While Flatpak addresses many application needs, some software requires specific dependencies or deeper system integration that Flatpak cannot provide. apx was developed to fill this gap, offering a declarative, containerized solution for managing such applications without compromising the host system's immutability. Its development focuses on providing a user-friendly experience similar to traditional package managers, abstracting away the underlying container complexities.

SEE ALSO

podman(1), distrobox(1), rpm-ostree(1), flatpak(1), snapd(8), toolbox(1)

Copied to clipboard