Skip to content

Instantly share code, notes, and snippets.

@jitomesky
Forked from Akkiesoft/minimal-raspbian2.sh
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitomesky/324154f54703586e2414 to your computer and use it in GitHub Desktop.
Save jitomesky/324154f54703586e2414 to your computer and use it in GitHub Desktop.
#/bin/bash
# コンパクトなRaspbianを作るやつをベースに自己流にアレンジしたもの
# Xを残したいバージョン: https://gist.github.com/Akkiesoft/9916490
#
# ベース: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/
# 前のバージョン: https://gist.github.com/Akkiesoft/5426660
sudo apt-get update
rm -rf python_games ocr_pi.png Desktop/*.desktop
sudo rm -rf /opt/*
XPKGS='x11-common xdg-utils gnome-themes-standard-data dillo midori penguinspuzzle lxde lxde-common lxde-icon-theme xkb-data xpdf fonts-freefont-ttf '`sudo dpkg --get-selections | grep -v "deinstall" | grep x11 | sed s/install//`
LEARNING='scratch squeak-vm squeak-plugins-scratch supercollider sonic-pi wolfram-engine'
sudo apt-get remove $XPKGS $LEARNING x2x
# Run autoremove, upgrade and clean cache.
sudo apt-get autoremove -y
sudo apt-get upgrade -y
sudo apt-get clean
# Regenerate Swap
sudo swapoff -a
cd /var
sudo dd if=/dev/zero of=swap bs=1M count=100
# Clear logs
cd /var/log/
#sudo rm `find . -type f`
history -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment