Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
lxde lxtask menu-xdg gksu
xserver-xorg-video-fbturbo
xpdf gtk2-engines alsa-utils
netsurf-gtk zenity
desktop-base lxpolkit
weston
omxplayer
raspberrypi-artwork
lightdm gnome-themes-standard-data gnome-icon-theme
qt50-snapshot qt50-quick-particle-examples
"
# Edu-related packages
pkgs="$pkgs
idle python3-pygame python-pygame python-tk
idle3 python3-tk
python3-rpi.gpio
python-serial python3-serial
python-picamera python3-picamera
python3-pygame python-pygame python-tk
python3-tk
debian-reference-en dillo x2x
scratch nuscratch
timidity
smartsim penguinspuzzle
pistore
sonic-pi
python3-numpy
python3-pifacecommon python3-pifacedigitalio python3-pifacedigital-scratch-handler python-pifacecommon python-pifacedigitalio
oracle-java8-jdk
minecraft-pi python-minecraftpi
wolfram-engine
"
# Because of of https://github.com/RPi-Distro/raspberrypi-ui-mods/issues/2 (thanks @robertely)
echo apt-get -y remove raspberrypi-ui-mods
# Remove packages
for i in $pkgs; do
echo apt-get -y remove --purge $i
done
# Remove automatically installed dependency packages
echo apt-get -y autoremove
# Remove all packages marked rc (thanks @symm)
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge
@bbredewold

This comment has been minimized.

Show comment
Hide comment
@bbredewold

bbredewold Sep 20, 2015

Thanks! Very useful!

bbredewold commented Sep 20, 2015

Thanks! Very useful!

@jorjun

This comment has been minimized.

Show comment
Hide comment
@jorjun

jorjun Sep 30, 2015

Big Thanks. Trying to install openCV from source & running out of space. Hopefully this will let me continue.

jorjun commented Sep 30, 2015

Big Thanks. Trying to install openCV from source & running out of space. Hopefully this will let me continue.

@KaidenP

This comment has been minimized.

Show comment
Hide comment
@KaidenP

KaidenP Oct 29, 2015

Why do:

# Remove automatically installed dependency packages
echo apt-get -y autoremove

# Remove all packages marked rc (thanks @symm)
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge

when you could do

echo apt-get -y autoremove --purge

KaidenP commented Oct 29, 2015

Why do:

# Remove automatically installed dependency packages
echo apt-get -y autoremove

# Remove all packages marked rc (thanks @symm)
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs dpkg --purge

when you could do

echo apt-get -y autoremove --purge
@samatjain

This comment has been minimized.

Show comment
Hide comment
@samatjain

samatjain Nov 23, 2015

@kkprice1998: AFAIK those don't do the same thing…

The two-command version in the script will remove packages whose configuration files remain installed that are both automatically installed and manually installed.

Your one-command version will only remove configuration packages for those packages that were automatically installed.

Thinking about it makes me think there's a bug that was supposed to be fixed in this version of Slim-Raspbian.sh… raspberrypi-ui-mods should NOT have it's configuration files removed, but with the two command version above that's exactly what happens. I'll look into it.

Owner

samatjain commented Nov 23, 2015

@kkprice1998: AFAIK those don't do the same thing…

The two-command version in the script will remove packages whose configuration files remain installed that are both automatically installed and manually installed.

Your one-command version will only remove configuration packages for those packages that were automatically installed.

Thinking about it makes me think there's a bug that was supposed to be fixed in this version of Slim-Raspbian.sh… raspberrypi-ui-mods should NOT have it's configuration files removed, but with the two command version above that's exactly what happens. I'll look into it.

@hub23

This comment has been minimized.

Show comment
Hide comment
@hub23

hub23 Aug 23, 2016

Is the bug still present? Seems to be closed.

hub23 commented Aug 23, 2016

Is the bug still present? Seems to be closed.

@roranicus

This comment has been minimized.

Show comment
Hide comment
@roranicus

roranicus Apr 20, 2018

Thanks for that. Saved me a lot of time.

roranicus commented Apr 20, 2018

Thanks for that. Saved me a lot of time.

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