chmod +x ~/bin/allupgrade Add to PATH (or just run ~/bin/allupgrade ). allupgrade Run it once a week or before major work sessions. Important Warnings | Risk | Mitigation | |------|-------------| | Auto-upgrading pip/npm can break projects | Use virtual environments instead of global | | -y assumes yes to all prompts | Read output after running | | Kernel upgrades require reboot | Run needs-restart -r or check /var/run/reboot-required | | Conflicting dependencies | Keep backups + use timeshift or snapper | Safer Alternative: Selective Upgrade Instead of -y , remove auto-confirm and review changes:
alias allupgrade='sudo apt update && sudo apt upgrade -y && sudo snap refresh && flatpak update -y' Create ~/bin/allupgrade : allupgrade
echo "==> Updating npm global packages" if command -v npm &>/dev/null; then sudo npm update -g fi chmod +x ~/bin/allupgrade Add to PATH (or just
echo "==> Updating pip global packages" if command -v pip3 &>/dev/null; then pip3 list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip3 install -U fi then sudo snap refresh fi
Make it executable:
echo "==> Updating Snap packages" if command -v snap &>/dev/null; then sudo snap refresh fi