Created
May 27, 2013 01:32
-
-
Save Witiko/5654734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Time zones | |
sudo dpkg-reconfigure tzdata | |
sudo apt-get update | |
yes | sudo apt-get upgrade | |
yes | sudo apt-get install console-data locales | |
# Locales | |
sudo dpkg-reconfigure locales | |
# Bloatware away! | |
yes | sudo apt-get purge x11-common midori lxde python3 python3-minimal | |
yes | sudo apt-get purge `sudo dpkg --get-selections | grep "\-dev" | sed s/install//` | |
yes | sudo apt-get purge `sudo dpkg --get-selections | grep -v "deinstall" | grep python | sed s/install//` | |
yes | sudo apt-get purge lxde-common lxde-icon-theme omxplayer | |
yes | sudo apt-get purge `sudo dpkg --get-selections | grep -v "deinstall" | grep x11 | sed s/install//` | |
# Lightweight SSHd | |
yes | sudo apt-get purge `sudo dpkg --get-selections | grep -v "deinstall" | grep ssh | sed s/install//` | |
yes | sudo apt-get install dropbear | |
yes | sudo apt-get purge ca-certificates libraspberrypi-doc xkb-data fonts-freefont-ttf | |
# Swap + SD? Surely you jest! | |
sudo dphys-swapfile uninstall | |
yes | sudo apt-get purge dphys-swapfile | |
# APT clean-up | |
sudo rm -rf /opt /usr/share/icons | |
rm -rf ~/python_games ~/ocr_pi.png Desktop | |
yes | sudo apt-get autoremove | |
sudo apt-get clean | |
# Logs? What for? | |
cd /var/log/ | |
sudo rm `find . -type f` | |
# Looks like we're done here | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment