Skip to content

RaymonDev/ubuntu-no-telemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🔒 ubuntu-no-telemetry

Ubuntu License Shell

An interactive Bash script that removes or disables all telemetry, tracking, and data collection components in Ubuntu 26.04 LTS "Resolute Raccoon".

Each step tells you exactly what data the component collects, then waits for your confirmation before doing anything. Your desktop and GUI are fully preserved.


What it does

Step Component What it collects Action
1 Ubuntu Insights Monthly hardware metrics (CPU, GPU, RAM, disk, screen) Revokes consent, removes package, wipes cache
2 Ubuntu Report Hardware/software info sent to Canonical Opts out, removes package, wipes cache
3 Apport + Whoopsie Crash reports + unique machine GUID sent to Canonical Stops, masks, removes both services; clears /var/crash
4 Popularity-Contest List of installed packages sent to Ubuntu servers Opts out and removes package
5 MOTD News / APT News Makes outbound connections to Canonical on every login Disables timer, drops apt config, removes exec bits
6 Zeitgeist Logs every file access and app launch on the desktop Stops daemon, removes package, deletes stored data
7 GNOME Privacy Recent files, app usage, location via GeoClue Disables tracking for all local users, masks GeoClue
8 Snap Metrics Refresh metrics reported to Canonical's store Disables metrics (optional full-removal instructions shown)
9 Cleanup Cleans package cache (autoclean only — see below)

GNOME settings are applied for all local users, not just root.


Why autoremove is intentionally skipped

Earlier versions of this script ran apt autoremove after purging telemetry packages. This caused gdm3 and gnome-shell to be removed as orphaned dependencies, leaving users with no GUI.

The current version:

  • Marks gdm3, ubuntu-desktop, gnome-shell, gnome-session, and xorg as manually installed before touching anything else
  • Runs only autoclean (clears package cache, touches nothing installed)
  • Skips autoremove entirely

If you want to run autoremove yourself after the script, always preview first:

apt-get --dry-run autoremove

Persistence — will telemetry come back?

Most changes are permanent. A few edge cases to be aware of:

Component Persistent? Notes
Removed packages ✅ Yes Stay gone unless you reinstall them
systemctl mask ✅ Yes Survives reboots and updates
gsettings keys ✅ Yes Persist per user profile
MOTD exec bits ⚠️ Mostly A update-motd package update can restore them
Ubuntu Insights ⚠️ On upgrade Major release upgrades may reinstall and re-ask consent
Snap metrics ⚠️ Mostly snapd updates can occasionally reset this

To make removed packages truly permanent, pin them so apt never reinstalls them as a dependency:

for pkg in apport whoopsie popularity-contest ubuntu-report ubuntu-insights zeitgeist zeitgeist-core; do
    echo -e "Package: $pkg\nPin: release a=*\nPin-Priority: -10" \
    | sudo tee /etc/apt/preferences.d/no-telemetry-${pkg}.pref
done

Usage

Interactive (recommended)

git clone https://github.com/YOUR_USERNAME/ubuntu-no-telemetry.git
cd ubuntu-no-telemetry
chmod +x ubuntu2604_privacy.sh
sudo ./ubuntu2604_privacy.sh

At each step the script shows what the component collects, then prompts:

  • Enter → run the step
  • s → skip it

Non-interactive (skip all prompts)

sudo ./ubuntu2604_privacy.sh --yes

Useful for automated deployments or post-install scripts.


Requirements

  • Ubuntu 26.04 LTS (Resolute Raccoon)
  • Root / sudo access
  • Bash 5+

After running

A reboot is recommended once the script finishes to ensure all disabled services are fully unloaded.


Optional: Full Snap removal

Step 8 disables Snap's metrics but does not remove Snapd, to avoid breaking apps you installed from the Snap Store. If you want to go further, the script prints the exact commands to remove Snap entirely at the end of step 8.


What this script does NOT do

This script is focused strictly on stopping data collection. It does not:

  • Configure a firewall (consider ufw)
  • Harden SSH
  • Enable full-disk encryption
  • Replace your browser or DNS resolver

For a more complete privacy setup, consider pairing this script with Pi-hole, Mullvad VPN, or Privacy Guides.


Compatibility

Ubuntu Version Status
26.04 LTS (Resolute Raccoon) ✅ Tested target
24.04 LTS (Noble Numbat) ⚠️ Partial — Ubuntu Insights steps skipped gracefully
22.04 LTS (Jammy Jellyfish) ⚠️ Partial — same as above

Contributing

Pull requests are welcome. If a new telemetry component appears in a future Ubuntu release, open an issue or submit a PR adding a new step.


License

MIT


Disclaimer

This script modifies system packages and services. While all changes are reversible (packages can be reinstalled, gsettings keys reset), use it at your own risk. Always read through the script before running it on a production machine.

About

Interactive bash script to remove all telemetry and tracking from Ubuntu 26.04 LTS (Resolute Raccoon). Step-by-step, safe, GUI-preserving.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages