Skip to content

Instantly share code, notes, and snippets.

@matthewpwatkins
Created March 7, 2026 16:37
Show Gist options
  • Select an option

  • Save matthewpwatkins/07d81c8ad1eaa5bff408b0dd70dd5200 to your computer and use it in GitHub Desktop.

Select an option

Save matthewpwatkins/07d81c8ad1eaa5bff408b0dd70dd5200 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Safe Linux Mint Debloater — removes common pre-installed apps you likely don't need.
# Run as root: sudo bash debloat-safe.sh
set -euo pipefail
# ── Root check ────────────────────────────────────────────────────────────────
if [ "$EUID" -ne 0 ]; then
echo "Please run as root: sudo bash $0"
exit 1
fi
# ── Packages to remove ────────────────────────────────────────────────────────
# Edit this list to keep anything you want.
PACKAGES=(
# Office suite
libreoffice-core
libreoffice-common
libreoffice-writer
libreoffice-calc
libreoffice-impress
libreoffice-draw
libreoffice-base-core
libreoffice-math
# Email / calendar
thunderbird
gnome-calendar
gnome-contacts
# Media apps you probably have alternatives for
rhythmbox # music player
celluloid # video player
# Misc pre-installed apps
transmission-gtk # BitTorrent client
hexchat # IRC client
warpinator # local network file sharing
drawing # basic drawing app
gnote # note-taking
simple-scan # scanner utility
onboard # on-screen keyboard
gnome-logs # systemd log viewer
gnome-power-manager # power stats GUI
baobab # disk usage analyzer
pix # image browser
xreader # document viewer
seahorse # GPG key manager GUI
mintwelcome # welcome screen
)
# ── Dry-run preview ───────────────────────────────────────────────────────────
echo ""
echo "The following packages will be removed:"
echo ""
for pkg in "${PACKAGES[@]}"; do
echo " - $pkg"
done
echo ""
read -r -p "Proceed? [y/N] " confirm
if [[ ! "$confirm" =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 0
fi
# ── Remove packages ───────────────────────────────────────────────────────────
echo ""
echo "Removing packages..."
for pkg in "${PACKAGES[@]}"; do
if dpkg -l "$pkg" &>/dev/null; then
echo " Removing $pkg..."
apt-get purge -y "$pkg"
else
echo " Skipping $pkg (not installed)"
fi
done
# ── Clean up orphaned dependencies ───────────────────────────────────────────
echo ""
echo "Cleaning up orphaned dependencies..."
apt-get autoremove -y
apt-get clean
echo ""
echo "Done. You may want to reboot."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment