distrobox-upgrade
Upgrade software packages within a Distrobox container
TLDR
Upgrade a container using the container's native package manager
Upgrade all containers using the container's native package managers
Upgrade specific containers via the container's native package manager
SYNOPSIS
distrobox-upgrade [OPTIONS] [CONTAINER_NAME]
PARAMETERS
-h, --help
Display help information for the command.
CONTAINER_NAME
Optional. Specifies the name of a single Distrobox container to upgrade. If omitted, all existing containers will be upgraded.
DESCRIPTION
The distrobox-upgrade command provides a convenient way to update packages within your Distrobox containers. Instead of manually entering each container and running its specific package manager's upgrade command (e.g., apt upgrade, dnf upgrade, pacman -Syu), this command automates the process. It can upgrade all existing containers or a specified one. It detects the container's distribution and executes the appropriate upgrade sequence, ensuring your containerized environments remain up-to-date, secure, and stable with minimal effort. This significantly streamlines the maintenance of diverse development or testing setups.
CAVEATS
• Ensure the container is running or can be started by Distrobox.
• Internet connectivity is required within the container for updates.
• Large updates can consume significant time and bandwidth.
• While automated, some package managers may still prompt for user input during complex upgrades, requiring manual intervention by entering the container.
• It is always prudent to back up critical data before performing major system-wide updates, though distrobox-upgrade primarily handles package updates.
HOW IT WORKS INTERNALLY
distrobox-upgrade intelligently identifies the underlying distribution of each container (e.g., Debian, Fedora, Arch Linux). Based on this identification, it executes the appropriate system-wide update command within the container. For example:
• Debian/Ubuntu: sudo apt update && sudo apt upgrade -y
• Fedora/RHEL/CentOS: sudo dnf upgrade -y
• Arch Linux: sudo pacman -Syu --noconfirm
This ensures seamless and correct updating regardless of the container's base system, abstracting away the specifics of each package manager from the user.
HISTORY
The distrobox project was initiated to simplify the creation and management of containerized development environments on Linux. The distrobox-upgrade command emerged as a natural extension of this goal, providing a unified and automated approach to keep these diverse environments up-to-date. Its inclusion reflects the project's commitment to reducing administrative overhead and enhancing the user experience for developers and system administrators utilizing multiple Linux distributions simultaneously.
SEE ALSO
distrobox(1), distrobox-create(1), distrobox-enter(1), distrobox-list(1), distrobox-rm(1)