-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathleanpi.sh
More file actions
executable file
·52 lines (39 loc) · 1.6 KB
/
leanpi.sh
File metadata and controls
executable file
·52 lines (39 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Created by Ravbug (github.com/ravbug)
#
# Run the script with no arguments to see about info
#bloat lists
bloat1="greenfoot bluej nodered scratch* nuscratch sonic-pi epiphany-browser netsurf-gtk zenity omxplayer qt* debian-reference* dillo timidity smartsim *minecraft-pi wolfram-engine libreoffice* claws-mail* vlc jackd1 libjack0 libzita-alsa-pcmi0 libzita-resampler1 qjackctl"
bloat2="$bloat1 idle* oracle-java* openjdk* nodejs npm python3-thonny*"
echo -e "\e[1m\e[41mLean-Pi: Raspberry Pi debloater\e[0m"
# if no valid arguments, informational echo statement
if [[ $# -eq 0 ]] ; then
echo -e "
This script removes unwanted software,
and the software's dependencies, from fresh raspbian installs.
This script does not remove python, because removing python breaks everything.
\e[1mList 1 (normal bloat)\e[0m
$bloat1
\e[1mList 2 (list 1 + programmer bloat)\e[0m
$bloat2
To remove bloat, re-run this script, passing the \e[1m-1\e[0m or \e[1m-2\e[0m arguments
based on which list you want to remove.
Example: \e[1m./`basename "$0"` -2\e[0m"
exit 0
fi
# get arguments, and auto remove bloat based on arguments
bloatlist=;
while getopts ":12" OptionArgument; do
case $OptionArgument in
1 ) bloatlist=$bloat1;
;;
2 ) bloatlist=$bloat2;
;;
* ) echo "No valid argument passed. Re-run the script without arguments for help."; exit 1;
esac
done
echo -e "\e[1mRemoving the following packages, and their dependencies:\e[0m
$bloatlist";
# remove the packages, their configurations, and their dependencies
sudo apt-get purge -qq --auto-remove $bloatlist -y
# remove python games
# rm -rf ~/python_games