14

This question already has an answer here:

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.

marked as duplicate by avra, Jacobm001, Bex, Steve Robillard Aug 18 '15 at 0:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

15

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.

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.

  • 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
6

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
  • 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
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.

  • 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 minibianpi.wordpress.com/features , it is not mentioned that rootfs is configured as read only. You can follow this post to make it rw. 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.

  • 4
    Noooo, please no Windows for me. :D I am happy with Linux. :) – Ionică Bizău Aug 12 '15 at 12:27
  • 1
    Can't argue with that ;) – Piotr Kamoda Aug 12 '15 at 15:24
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.

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!
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.