update
This commit is contained in:
22
apt_upgrade.sh
Executable file
22
apt_upgrade.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/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 ==="
|
||||
Reference in New Issue
Block a user