#!/bin/bash

# Check if the script is run with root privileges
if [[ "$EUID" -ne 0 ]]; then
  echo "This script must be run with sudo or as root." >&2
  exit 1
fi

# Uninstalls all available packages from cvb
apt purge -y cvb-core


if echo $(uname -m) | grep -ciq x86_64; then
  apt remove -y codemeter
fi

echo ""
echo Reboot recommended!
