Move legacy systemscripts into scripts/display and scripts/setup. Rehome stray top-level tools into their domain folders. Archive narrow experiments and outdated codegrab leftovers. Remove empty legacy directories and stale root files. Expand macOS metadata ignores and update the README with the refined repository structure.
33 lines
1.2 KiB
Bash
Executable File
33 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Check if script is run as root
|
|
if [ "$EUID" -ne 0 ]; then
|
|
echo "Please run this script with sudo."
|
|
exit 1
|
|
fi
|
|
|
|
# Explicitly decline data collection for ubuntu-report (if it was not removed)
|
|
echo "Declining data collection for ubuntu-report..."
|
|
if command -v ubuntu-report &> /dev/null; then
|
|
ubuntu-report -f send no
|
|
fi
|
|
|
|
# Remove telemetry packages
|
|
echo "Removing telemetry packages..."
|
|
sudo apt purge -y ubuntu-report popularity-contest apport whoopsie apport-symptoms
|
|
|
|
# Prevent packages from being reinstalled
|
|
echo "Preventing telemetry packages from being reinstalled..."
|
|
sudo apt-mark hold ubuntu-report popularity-contest apport whoopsie apport-symptoms
|
|
|
|
# Block telemetry domains
|
|
echo "Blocking telemetry domains..."
|
|
sudo bash -c 'echo "127.0.0.1 www.metrics.ubuntu.com" >> /etc/hosts'
|
|
sudo bash -c 'echo "127.0.0.1 metrics.ubuntu.com" >> /etc/hosts'
|
|
sudo bash -c 'echo "127.0.0.1 www.popcon.ubuntu.com" >> /etc/hosts'
|
|
sudo bash -c 'echo "127.0.0.1 popcon.ubuntu.com" >> /etc/hosts'
|
|
|
|
# Disable error reporting in settings (requires GUI interaction)
|
|
echo "To fully disable telemetry, ensure 'Send error reports to Canonical' is set to 'Never' in Settings → Privacy → Diagnostics."
|
|
|
|
echo "Telemetry disabling completed." |