undress raspbian

on

My raspberry pi with 64 gig sd card running raspbian was a bit unstable. Sometimes it took 4 or 5 tries to get it booted. And it crashed once in a while. Finally I got out of this misery by stopping the dbus.

$sudo service dbus stop

and prevent starting it again at next boot

$sudo update-rc.d dbus remove

Now get rid of all the x11 “shit” let’s try

$sudo apt-get --auto-remove --purge remove libx11*

Before this command 702 packages where installed. Afterwards about 480 are left. But a lot of trash has been left. So with another

$sudo apt-get autoremove

the number of installed packages is reduced to 450. Still not everything has been removed. So:

$dpkg -l | grep '^rc'

shows all packages marked for purge (package has been removed, but still configuration files exist). Let’s remove them.

$dpkg -l | grep '^rc' | cut -d" " -f3 | xargs sudo dpkg --purge

Now I’m left with 375 packages. It’s getting better. Get rid of all dbus things (will also remove wpasupplicant and udisks.. well)

$sudp apt-get remove libdbus*
$sudo apt-get autoremove

removes another 28 packages. Now remove samba

$sudo apt-get --auto-remove --purge remove samba-common

remove ifplugd

$sudo apt-get --auto-remove --purge remove ifplugd

cleanup /etc/network/interfaces till:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

Ok now rebooting the pi will take less than 30 seconds (from shutdown -r now till the device reacts on ping).

Hmm sound what do I need that for let’s get rid of alsa:

sudo apt-get --auto-remove --purge remove alsa-*

and the rest:

sudo apt-get --auto-remove --purge remove omxplayer desktop-file-utils xdg* penguinspuzzle java-common firmware*