Files
bin/apt_upgrade.sh
rozbrian 304cbcc554 update
2026-01-10 20:46:22 +09:00

23 lines
495 B
Bash
Executable File

#!/bin/bash
# This script will update and upgrade all packages automatically.
# Run as root or with sudo.
set -e
echo "=== Starting full system upgrade ==="
# Update the package lists
apt update -y
# Upgrade all packages without interaction
DEBIAN_FRONTEND=noninteractive apt -y upgrade
# Upgrade including kernel and dependencies
DEBIAN_FRONTEND=noninteractive apt -y dist-upgrade
# Remove unused packages
apt -y autoremove
apt -y autoclean
echo "=== Upgrade completed successfully ==="