23 lines
495 B
Bash
Executable File
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 ==="
|