Simple script to cleanup some unnecessary applications and hardening a stock Raspbian installation
-
Removes the following applications along with their dependencies:
ant claws-mail code-the-classics ffmpeg exim4-base geany hplip mu-editor printer-driver-escpr printer-driver-gutenprint python-games qpdfview vlc bluej greenfoot-unbundled scratch nuscratch sense-emu-tools sonic-pi thonny smartsim libreoffice
-
Disables the following servies:
sshd avahi-daemon cups
-
Updates all packages and performs a
dist-upgrade
-
Installs
ufw
enables it and blocks all incoming connections. (ufw default deny incoming
) -
Installs
apparmor apparmor-profiles apparmor-utils
and enforces all rules in/etc/apparmor.d/*
-
Blacklists
usbhid
module -
Fixes sudoers file, changes
(ALL:ALL)
to(ALL)
forroot
and%sudo
-
Removes
$USER
fromadm gpio i2c lpadmin plugdev spi sudo
groups