A universal Linux system update script that automatically detects your distro and updates all installed package managers.
- Auto-detects Linux distribution and tries to use the appropriate package manager
- Updates system packages for:
- Debian/Ubuntu (apt)
- Red Hat/Fedora/CentOS (dnf/yum)
- Arch Linux (pacman)
- openSUSE/SUSE (zypper)
- Alpine Linux (apk)
- Updates additional package managers if installed:
- Flatpak applications
- Snap packages
- Firmware updates (via fwupdmgr)
- Homebrew packages
- Automatically reboots system after updates complete
# Make the script executable
chmod +x main.sh
# Run the script
./main.shNote: The script requires sudo privileges and will prompt for your password.
- Detects your Linux distribution
- Updates system packages using the native package manager
- Checks for and updates Flatpak applications (if installed)
- Checks for and updates Snap packages (if installed)
- Checks for and updates system firmware (if fwupdmgr is installed)
- Checks for and updates Homebrew packages (if installed)
- Reboots the system to apply all updates
- Debian and derivatives (Ubuntu, Kali, Linux Mint, Pop!_OS, etc.)
- Red Hat and derivatives (RHEL, Fedora, CentOS, AlmaLinux, Rocky Linux)
- Arch Linux and derivatives (Manjaro, EndeavourOS, etc.)
- openSUSE/SUSE Linux Enterprise
- Alpine Linux
This script is provided as-is without any warranty. Use at your own risk.