-
Notifications
You must be signed in to change notification settings - Fork 10
/
telemetry_off.sh
25 lines (20 loc) · 943 Bytes
/
telemetry_off.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Disable telemetry
# Disable the services
sudo systemctl stop apport.service
sudo systemctl disable apport.service
sudo systemctl stop whoopsie.service
sudo systemctl disable whoopsie.service
echo "Disabling telemetry"
sudo apt remove ubuntu-report whoopsie apport -y
# Prevent telemetry from being reinstalled
printf "Package: ubuntu-report\nPin: release a=*\nPin-Priority: -10" >> no-ubuntu-report.pref
sudo mv no-ubuntu-report.pref /etc/apt/preferences.d/
sudo chown root:root /etc/apt/preferences.d/no-ubuntu-report.pref
printf "Package: whoopsie\nPin: release a=*\nPin-Priority: -10" >> no-whoopsie.pref
sudo mv no-whoopsie.pref /etc/apt/preferences.d/
sudo chown root:root /etc/apt/preferences.d/no-whoopsie.pref
printf "Package: apport\nPin: release a=*\nPin-Priority: -10" >> no-apport.pref
sudo mv no-apport.pref /etc/apt/preferences.d/
sudo chown root:root /etc/apt/preferences.d/no-apport.pref
echo "Completed"