This script performs system updates on Linux by updating APT (Debian-based package manager), Snap, and Flatpak packages with a single command. It checks if each package manager is installed on the system before attempting updates and provides options for non-interactive updates and help.
The script performs the following functions:
- APT Updates: Updates and upgrades packages managed by APT if it is installed. Prompts for confirmation unless
-y
option is provided. - Snap Updates: Checks for Snap updates and prompts for confirmation unless
-y
option is provided. - Flatpak Updates: Checks for updates to Platpak packages if installed. Prompts user for confirmation unless
-y
option is provided. - Reboot Notification: Notifies if a system restart is required after updates.
Usage: upgrade [OPTION]
Performs system updates for packages managed by APT, Snap, and Flatpak on a Linux systems.
Optional arguments:
-y, --yes does not prompt before applying updates
-h, --help displays this message
- Updates are grouped by package manager, with color-coded section headings for each.
- Reboot requirement notices are highlighted in yellow if a restart is needed.
- APT, Snap, or Flatpak installed (any or all of them).
- Root Privileges: The script automatically execute needed commands with sudo to perform updates.
- Non-interactive Mode: Use -y to skip prompts, useful for automated environments.
This project is open-source and distributed under the GPL-2.0 license