Skip to content

Added debian12.10-gnome-debloat.sh #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions scripts/debian12.10-gnome-debloat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash

if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root. Use 'sudo'."
exit 1
fi

echo "Minimizing GNOME to gnome-core setup while removing additional GNOME apps and keeping extensions and icons..."

PACKAGES_TO_REMOVE=(
gnome-games
gnome-weather
gnome-calendar
gnome-contacts
gnome-maps
gnome-photos
gnome-music
rhythmbox
totem
shotwell
cheese
evolution
brasero
bijiben
libreoffice*
transmission*
aisleriot
simple-scan
gnome-sound-recorder
gnome-calculator
xterm
gnome-camera
gnome-tour
gnome-clock
xiterm+thai
)

for pkg in "${PACKAGES_TO_REMOVE[@]}"; do
if dpkg -l | grep -q "^ii\s*${pkg}"; then
echo "Removing: $pkg"
apt purge -y "$pkg"
else
echo "$pkg is not installed, skipping..."
fi
done

echo "Cleaning up unused packages..."
apt autoremove -y --purge

echo "Reinstalling minimal GNOME (gnome-core)..."
apt install -y --no-install-recommends gnome-core

echo "Preserving GNOME Shell extensions..."
if dpkg -l | grep -q gnome-shell-extensions; then
echo "GNOME Shell extensions are already installed."
else
echo "Installing GNOME Shell extensions..."
apt install -y gnome-shell-extensions
fi

apt clean
rm -rf /var/cache/apt/archives/*
rm -rf /tmp/*

echo "GNOME is now minimized to a gnome-core setup with all unnecessary apps removed, extensions and icons preserved!"
echo "Consider restarting your system with: sudo reboot"


# (c) 2025 Mealman1551, https://github.com/Mealman1551