Script 02 · System Maintenance

2. uCareSystem Core (Auto Update Tool)

Installs uCareSystem Core to automate Ubuntu package updates, cleanup unused packages, and remove old kernels.

Category: System Maintenance Risk: Medium Lines: calculating Language: Bash / Linux
Back to index

What this script does

  • Simplify routine package maintenance.
  • Reduce disk usage from obsolete kernels and packages.
  • Provide an optional immediate cleanup run.

Prerequisites

  • Root access
  • APT package manager
  • Internet access to Ubuntu PPA

Execution flow

  1. Adds the uCareSystem PPA
  2. Runs apt update
  3. Installs ucaresystem-core
  4. Optionally runs cleanup immediately

Validation checklist

  • command -v ucaresystem-core
  • sudo ucaresystem-core --help

Operational cautions

  • Third-party PPAs add package trust surface.
  • Run on staging first if the server has strict package pinning.

Original script notes

ℹ️ Script Info: Automates the installation of uCareSystem Core, a maintenance tool used to keep your Ubuntu system updated, clean up old kernels, and remove unused packages automatically.

Script source
cat << 'EOF' > ucaresystem-core.sh
#!/bin/bash

# Ensure script is run as root
if [ "$EUID" -ne 0 ]; then
  echo "Please run this script with sudo!"
  exit
fi

echo "# Main Execution Block: Adding PPA and Installing uCareSystem Core"

# 1. Add official uCareSystem PPA
echo ">> Adding PPA..."
add-apt-repository ppa:utappia/stable -y

# 2. Update repository
echo ">> Updating Repository..."
apt update

# 3. Install package
echo ">> Installing uCareSystem Core..."
apt install ucaresystem-core -y

echo "-----------------------------------------------------------------"
echo "Installation Complete."
echo "-----------------------------------------------------------------"

# 4. Interactive Choice: Run or Not
read -p "Do you want to run uCareSystem Core now? (y/n): " choice
case "$choice" in 
  y|Y ) 
    echo ">> Running uCareSystem Core..."
    ucaresystem-core
    ;;
  * ) 
    echo ">> Skipped. Program not run."
    echo ">> You can run it manually later by typing: sudo ucaresystem-core"
    ;;
esac
EOF

chmod +x ucaresystem-core.sh && sudo ./ucaresystem-core.sh
Done