Skip to content

Instantly share code, notes, and snippets.

@richbodo
Last active December 11, 2015 12:28
Show Gist options
  • Save richbodo/4600847 to your computer and use it in GitHub Desktop.
Save richbodo/4600847 to your computer and use it in GitHub Desktop.
Purge Evil from Ubuntu 12.10 Quantal Quetzal
#!/bin/bash
# remove_evil_ubuntu_quantal.sh
if [ $(whoami) != "root" ]; then
echo "You need to run this script as a super user."
echo "Use 'sudo ./$script_name 2>&1 | tee log.txt' then enter your password when prompted. exorcism results will be logged to log.txt."
exit 1
fi
echo "This script is going to remove bizarre spyware and upgrade you to the full Gnome3 environment. You won't be using unity any longer."
echo "Did you read and understand this code snippet before you tried to run it? (y/n)"
read REPLY
if [ $REPLY != "y" ]; then
echo "Exiting..."
exit 1
fi
# Remove evil daemons
echo "stopping ubuntu one from continually trying to sell you stuff"
ps -ef|grep ubuntuone |grep -v grep |awk '{print $2}' |xargs kill -9
echo "stopping unity shopping daemon from giving your data to amazon"
ps -ef|grep unity-shopping-daemon |grep -v grep |awk '{print $2}' |xargs kill -9
echo "stopping zeitgeist from giving your data to canonical"
ps -ef|grep zeitgeist |grep -v grep |awk '{print $2}' |xargs kill -9
echo "stopping geoip from telling canonical where you are all the time"
ps -ef|grep geoip |grep -v grep |awk '{print $2}' |xargs kill -9
echo "removing those annoying things that give your personal information to other people and slow your computer down"
sudo apt-get -y --purge remove zeitgeist
sudo apt-get -y --purge remove unity-lens-shopping
sudo apt-get -y --purge remove ubuntuone-client* python-ubuntuone-storage*
sudo apt-get -y --purge remove rhythmbox-plugin-zeitgeist geoclue geoclue-ubuntu-geoip geoip-database
sudo apt-get -y autoremove
# Remove evil daemon poop
echo "removing bunches of sensitive information about you that shouldn't exist"
rm -rf ~/.local/share/ubuntuone
rm -rf ~/.cache/ubuntuone
rm -rf ~/.config/ubuntuone
rm -rf ~/Ubuntu\ One
rm -rf ~/.local/share/zeitgeist
# Fixup annoying things
echo "allowing you to easily see what applications start up when your computer starts"
export DEBIAN_FRONTEND=noninteractive
cd /etc/xdg/autostart/
sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop
sudo apt-get -y install jobs-admin
echo "making the time server more resilient and giving canonical less information about you"
cd /etc/
sudo sed --in-place 's/ubuntu.pool.ntp.org/pool.ntp.org/g' ntp.conf
sudo /etc/init.d/ntp restart
echo "Completely switching out unity for gnome3"
sudo add-apt-repository -y ppa:gnome3-team/gnome3
sudo apt-get -y update
sudo apt-get -y install gnome-shell gnome-tweak-tool
sudo apt-get -y install ubuntu-gnome-desktop ubuntu-gnome-default-settings
sudo apt-get -y remove ubuntu-settings
sudo apt-get -y install gnome-documents gnome-boxes
sudo apt-get -y remove overlay-scrollbar*
echo "choose GDM instead of lightDM in the config menu that follows, press enter when ready"
read KEY
sudo dpkg-reconfigure gdm
echo "You want to restart your computer now, so it can be reborn into speedy goodness."
echo "You should still go into system/privacy when this is done and turn off all the logging and communications settings. We tore out the backend of most of those, but best to have them turned off in config as well."
read KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment