18

I like Raspbian for simplicity. It runs, but still I don't like the following:

  • It comes with a GUI -- I want to install my own window manager (if I want)
  • It comes with programs like Mathematica, Wolfram, Sonic Pi, etc.

I don't want these, especially when my microSD size is precious.

Is there another distribution that offers the same functionality (especially in terms of drivers), but doesn't include such visual tools? I'm just happy with a command-line access.

Also, I would be interested how to uninstall these packages. I have Raspberry PI 2 Model B.

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
Ionică Bizău
  • 723
  • 3
  • 11
  • 32
  • What is Wolfram in this context? The programming language used by Mathematica? Wolfram Alpha? Or something else? – Peter Mortensen Aug 12 '15 at 19:41
  • @PeterMortensen There's a monster wolfram package in Raspbian by default for whatever reason; "wolfram engine" maybe? Anyway, it is about a quarter of the total image size, ~500 MB. – goldilocks Aug 12 '15 at 19:48
  • @goldilocks 460 MB disk space will be freed -- ohoho :) – Ionică Bizău Aug 13 '15 at 07:17
  • 3
    Something similar has already been discussed. Take a look at http://raspberrypi.stackexchange.com/questions/5258/how-can-i-remove-the-gui-from-raspbian-debian/5272#5272. If you want read only system then look at http://raspberrypi.stackexchange.com/questions/7101/raspberry-pi-live-boot-or-read-only-distro/19830#19830. – avra Aug 13 '15 at 12:00

8 Answers8

17

You could start with deleting the X packages:

sudo apt-get -y remove cups*
sudo apt-get -y remove gnome*
sudo apt-get -y remove x11-common*
sudo apt-get -y autoremove

I use the above for our 4 GB cards, and for us it works fine. It frees up (811 + 13.7 + 201 + 317 MB =) 1.343 GB. However, be careful as for your exact needs; it might as well delete too many packages. Try deleting fewer packages at once and check every time whether your applications still run or not.

IMHO, it's a good start however.

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
EDP
  • 1,691
  • 1
  • 14
  • 24
7

You could build your own image of Raspbian.

or, maybe simpler, install it stock and then remove the tools you don't need.

To disable the GUI (I did this to free up compute power on my B+ model)

sudo raspi-config

Start X-server after boot? --> disable

sudo apt-get purge wolfram-engine
Havnar
  • 1,617
  • 2
  • 16
  • 34
  • And how to uninstall the graphical side? In case I need one, I will install openbox (if not installed already). – Ionică Bizău Aug 12 '15 at 12:30
  • 1
    Then the question will be "How do I install openbox?". Raspbian is Debian with some configuration tweaks (e.g., the fact that it uses LXDE as the default desktop environment). Debian has been around for 20+ years and has lots and lots of online documentation. I am sure you can find something to read about how to use the package manager (apt) so you do not have to ask "How do I remove foo?" then an hour later, "Now how do I remove bar?". – goldilocks Aug 12 '15 at 13:12
  • Note that LXDE uses openbox for a window manager. Removing LXDE might save you ~100 MB. The fundamental part of the GUI stack is the X server, which you need if you want any form of desktop. – goldilocks Aug 12 '15 at 13:12
7

Arch Linux is pretty minimal out of the box. I tried Arch for the first time on a Raspberry Pi after using Debian-based systems for years and and I'm very happy with it. Here are instructions for a RPi and instructions for a RPi 2. After following these instructions the base install is about 550MB.

Wiring in to a network works out of the box and getting on wifi is pretty easy using netctl.

There are differences to consider like its package manager, pacman, and its init system, systemd, but well worth the learning curve.

I'm not sure what drivers you're specifically after but I haven't had much trouble getting software to run. For example, accessing GPIO via Python is a package install away.

Hope this helps.

berto
  • 1,231
  • 1
  • 9
  • 12
  • I still love the apt-get thing but you have an upvote from me. :) – Ionică Bizău Aug 12 '15 at 14:43
  • Thank you! :) And, yes, you are correct, Arch is not a Debian-based system. Instead of apt-get you would use pacman to install packages. – berto Aug 12 '15 at 15:45
  • specifically pacman -S <package> to install and pacman -Ss <package> for searching (a la apt-cache search). I love Arch, but it is a very RTFM ecosystem. – Wayne Werner Aug 12 '15 at 16:47
4

How about using a minibian ? It is a stripped down version of raspbian.

I've used it before. Image size is about 450 MiB and it very well fits in a 2 Gigs SD card. You can always install extra utilities as you need.

Here is the link.

Hope it helps.

dhruvvyas90
  • 2,853
  • 3
  • 19
  • 32
  • I tried it but the filesystem is readonly... :/ Nice project, but couldn't make it non-readonly. – Ionică Bizău Aug 12 '15 at 14:43
  • Are you sure it is read only ? Cause when I tried, I was able to read and write. – dhruvvyas90 Aug 12 '15 at 14:44
  • I installed it on a 2GB microsd two days ago and it was fast, but read-only. Anyway, upvote from me. :) – Ionică Bizău Aug 12 '15 at 14:46
  • Thank you for an upvote. :) As per this feature list https://minibianpi.wordpress.com/features/ , it is not mentioned that rootfs is configured as read only. You can follow this post to make it rw. https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=36010. You can mount your SD card on a linux box to make necessary changes in /etc/fstab Hope it helps. :) – dhruvvyas90 Aug 12 '15 at 14:56
3

It depends on what version of Raspberry Pi you have. If you have Raspberry Pi 2 then you could have a look at Windows 10 (core or IoT, I forgot its nickname). It comes only with a core functionality, no desktop manager (so I suppose you have some sort of DOS-looking console system). I think that from official repository Snappy Ubuntu is the smallest.

Piotr Kamoda
  • 391
  • 2
  • 8
1

You can try this solution Raspbian Server Edition. This link is a bit old, but you will find even a script to create your own Raspbian derivative at your needs.

TuxmAL
  • 21
  • 3
1

I needed to do the same thing a few month ago, so in addition to all the great answers, here are some of the guides I used tips from.

I've used Disk Usage Analyzer first, removed some of the files but then followed these guide for more specific files I was unsure about removing(without messing the OS up too much)

Disk Usage Analyzer

  1. Raspberry Pi – Clean & Purge unused locales and orphans
  2. How do I remove Java in Debian ?
  3. RPi Tuning: boost your RPi!
George Profenza
  • 651
  • 5
  • 10
  • 23
1

Checkout the official nightly headless images

DATE-raspbian-wheezy-1-noX.zip [...] does not have any X11/GUI packages or customizations installed

After flashing, I installed rpi-update using apt-get and that's it.