Skip to content

Instantly share code, notes, and snippets.

@pedrocarrico
Last active February 1, 2022 20:40
Show Gist options
  • Save pedrocarrico/6089614 to your computer and use it in GitHub Desktop.
Save pedrocarrico/6089614 to your computer and use it in GitHub Desktop.
Remove unneeded packages from raspbian
#!/bin/bash
# Stephen's Raspberry Pi Mimimalist install from standard Raspdian Image
# as seen in http://www.raspberrypi.org/phpBB3/viewtopic.php?f=24&t=45437
sudo apt-get update
sudo apt-get purge xserver* -y
sudo apt-get purge ^x11 -y
sudo apt-get purge ^libx -y
sudo apt-get purge ^lx -y
sudo apt-get purge samba* -y
sudo apt-get autoremove -y
sudo apt-get upgrade -y
sudo apt-get clean
@AgustinPelaez
Copy link

Thanks! a quick note, remember to run:

sudo chmod +x remove_packages.sh

to make it executable:

sudo ./remove_packages.sh

@MauriceMynah
Copy link

Hi,
This looks very useful.

Has it been tested or run on the latest Raspbian 2015-05-05 release?

@KaidenP
Copy link

KaidenP commented Sep 14, 2015

It should work with any debian/ubuntu, though may not remove all packages that are unnecessary. It will remove most of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment