Bazzite-Updates können klassisch über die Systemeinstellungen durchgeführt werden:
- Systemeinstellungen
- Softwareaktualisierung
Da ich es technisch mag, habe ich mein eigenes Script für die Updates in Bazzite erstellt. Dabei muss ich jedoch beachten, dass dieses Script nur für Bazzite (Immutable) ausgelegt ist und auf anderen Distributionen nicht oder nur eingeschränkt funktioniert.
nano ~/bazzite-pro-update.sh
#!/usr/bin/env bash
# ============================================================
# Bazzite PRO Update – kompakte Version
# ============================================================
echo "=== Starte Bazzite PRO Update ==="
# -------------------------------
# rpm-ostree
# -------------------------------
echo "→ Aktualisiere Hostsystem (rpm-ostree)..."
sudo rpm-ostree upgrade --allow-inactive --check
rpm_ostree_status=$(rpm-ostree status | grep -A1 'PendingDeployment' || true)
echo "rpm-ostree abgeschlossen."
# -------------------------------
# Flatpak
# -------------------------------
echo "→ Aktualisiere Flatpaks..."
flatpak update -y
flatpak uninstall --unused -y
echo "Flatpak abgeschlossen."
# -------------------------------
# Homebrew
# -------------------------------
if command -v brew &>/dev/null; then
echo "→ Aktualisiere Homebrew..."
brew update
brew upgrade
brew cleanup -s
echo "Homebrew abgeschlossen."
fi
# -------------------------------
# Firmware
# -------------------------------
if command -v fwupdmgr &>/dev/null; then
echo "→ Suche nach Firmware-Updates..."
sudo fwupdmgr refresh --force
sudo fwupdmgr update -y
echo "Firmware abgeschlossen."
fi
# -------------------------------
# Bereinigung
# -------------------------------
echo "→ Bereinige alte Deployments & Cache..."
sudo rpm-ostree cleanup -m
sudo ostree prune --refs-only --depth=1
echo "Bereinigung abgeschlossen."
# -------------------------------
# Reboot-Hinweis
# -------------------------------
if [[ -n "$rpm_ostree_status" ]]; then
echo "⚠️ Ein neues Deployment ist installiert. Bitte starte das System neu, um das Update zu aktivieren."
else
echo "✅ Kein Neustart erforderlich – System ist aktuell."
fi
echo "=== Bazzite PRO Update abgeschlossen ==="
Strg+x, y, Enter
chmod +x ~/bazzite-pro-update.sh
Start:
~/bazzite-pro-update.sh
Manchmal darf es allerdings etwas technischer sein. Dieses erweiterte Script prüft, ob ich mich in einem Container befinde, und wendet die Aktualisierung auch dort an.
Nachteil: Es funktioniert nur mit Fedora-Containern. Da ich innerhalb der Distrobox auch Ubuntu-Container oder andere Distributionen verwende, verzichte ich darauf.
#!/usr/bin/env bash
# ============================================================
# Bazzite PRO Update Script
# Autor: knilix
# - Erkennt Host / Distrobox automatisch
# - Aktualisiert rpm-ostree, Flatpak, Brew, Distrobox, Firmware
# - Bereinigt alte Deployments & Flatpaks
# - Fragt optional nach Reboot
# ============================================================
set -euo pipefail
# Farben
GREEN="\e[32m"
YELLOW="\e[33m"
RED="\e[31m"
RESET="\e[0m"
echo -e "${YELLOW}=== Starte vollständiges Bazzite PRO Update ===${RESET}"
# ------------------------------------------------------------
# Umgebung erkennen
# ------------------------------------------------------------
if grep -q "container=" /proc/1/environ 2>/dev/null || [ -f /.dockerenv ]; then
echo -e "${YELLOW}→ Distrobox oder Container erkannt.${RESET}"
if command -v dnf &>/dev/null; then
echo -e "${GREEN}Aktualisiere DNF-Pakete...${RESET}"
sudo dnf clean all -y
sudo dnf update -y
sudo dnf autoremove -y || true
else
echo -e "${YELLOW}DNF nicht gefunden, überspringe.${RESET}"
fi
if command -v brew &>/dev/null; then
echo -e "${GREEN}Aktualisiere Homebrew & Formeln...${RESET}"
brew update
brew upgrade
brew cleanup
else
echo -e "${YELLOW}Homebrew nicht installiert, überspringe.${RESET}"
fi
echo -e "${GREEN}Container erfolgreich aktualisiert.${RESET}"
exit 0
fi
# ------------------------------------------------------------
# Hostsystem erkannt
# ------------------------------------------------------------
echo -e "${YELLOW}→ Hostsystem erkannt (Bazzite rpm-ostree).${RESET}"
# 1. rpm-ostree Upgrade
echo -e "${GREEN}Führe rpm-ostree Upgrade aus...${RESET}"
if sudo rpm-ostree upgrade; then
echo -e "${GREEN}rpm-ostree erfolgreich aktualisiert.${RESET}"
else
echo -e "${RED}Fehler bei rpm-ostree upgrade!${RESET}"
fi
# 2. Flatpak Updates
if command -v flatpak &>/dev/null; then
echo -e "${GREEN}Aktualisiere Flatpaks...${RESET}"
flatpak update -y || echo -e "${YELLOW}Keine Flatpak-Updates gefunden.${RESET}"
echo -e "${GREEN}Bereinige alte Flatpak-Runtimes...${RESET}"
flatpak uninstall --unused -y || true
else
echo -e "${YELLOW}Flatpak nicht installiert, überspringe.${RESET}"
fi
# 3. Homebrew Updates
if command -v brew &>/dev/null; then
echo -e "${GREEN}Aktualisiere Homebrew & Formeln...${RESET}"
brew update
brew upgrade
brew cleanup
else
echo -e "${YELLOW}Homebrew nicht installiert, überspringe.${RESET}"
fi
# 4. Distrobox Updates
if command -v distrobox &>/dev/null; then
echo -e "${GREEN}Aktualisiere Distrobox-Container...${RESET}"
distrobox upgrade --all || echo -e "${YELLOW}Keine Distrobox-Container gefunden.${RESET}"
# Optionale Bereinigung in allen Distroboxen
for box in $(distrobox list --no-color 2>/dev/null | awk 'NR>1 {print $1}'); do
echo -e "${GREEN}Bereinige Distrobox: $box${RESET}"
distrobox enter "$box" -- sudo dnf autoremove -y || true
done
else
echo -e "${YELLOW}Distrobox nicht installiert, überspringe.${RESET}"
fi
# 5. Firmware Updates
if command -v fwupdmgr &>/dev/null; then
echo -e "${GREEN}Suche nach Firmware-Updates...${RESET}"
sudo fwupdmgr refresh --force || true
sudo fwupdmgr get-updates || true
sudo fwupdmgr update -y || true
else
echo -e "${YELLOW}fwupdmgr nicht installiert, überspringe.${RESET}"
fi
# 6. Systembereinigung
echo -e "${GREEN}Bereinige alte System-Deployments & Cache...${RESET}"
sudo ostree prune --refs-only || true
sudo rpm-ostree cleanup -m || true
sudo rpm-ostree cleanup -p || true
# 7. Reboot-Prüfung
if rpm-ostree status | grep -q "pending deployment"; then
echo -e "${YELLOW}Ein Neustart ist erforderlich, um Updates zu aktivieren.${RESET}"
read -rp "Jetzt neu starten? [y/N]: " answer
if [[ "${answer,,}" == "y" ]]; then
echo -e "${GREEN}Starte System neu...${RESET}"
systemctl reboot
else
echo -e "${YELLOW}Neustart übersprungen. Bitte später manuell ausführen.${RESET}"
fi
else
echo -e "${GREEN}Keine neuen Deployments – kein Neustart erforderlich.${RESET}"
fi
echo -e "${YELLOW}=== Bazzite PRO Update abgeschlossen ===${RESET}"