Skip to content

Instantly share code, notes, and snippets.

@shrimpwagon
Last active December 12, 2025 23:54
Show Gist options
  • Select an option

  • Save shrimpwagon/10d69240630cae5646d403e91f5599ed to your computer and use it in GitHub Desktop.

Select an option

Save shrimpwagon/10d69240630cae5646d403e91f5599ed to your computer and use it in GitHub Desktop.
Linux Mint Cleanup
#!/usr/bin/env bash
set -euo pipefail
# Personal Linux dev machine setup
# - Combines: git_setup.sh + remove_software.sh
# - Installs packages: git, php, phpmd, php-codesniffer, imagemagick, awscli
# - Installs Node.js 20.x from NodeSource and npm package @openai/codex globally
#
# Usage:
# bash setup_personal_dev.sh
#
# Notes: Requires apt-based distro (tested on Ubuntu/Mint)
log() { echo -e "\n==> $*"; }
# ---------------- System cleanup (from remove_software.sh) ----------------
log "Purging unwanted packages..."
PKGS=(
"firefox*"
gufw
celluloid
hexchat
hypnotix
"redshift*"
rhythmbox
"thunderbird*"
warpinator
webapp-manager
mintbackup
bulky
mintwelcome
onboard
simple-scan
drawing
gnome-calendar
thingy
sticky
redshift
timeshift
ufw
openvpn
)
for PKG in "${PKGS[@]}"; do
echo " -> Removing $PKG"
sudo apt-get -y -q purge "$PKG" || true
done
log "Disabling unneeded services and timers (if present)..."
SERVICES=(
bluetooth
blueman-mechanism
avahi-daemon
ModemManager
accounts-daemon
anacron
kerneloops
motd-news
networkd-dispatcher
plocate-updatedb
rsyslog
secureboot-db
touchegg
switcheroo-control
)
for SVC in "${SERVICES[@]}"; do
echo " -> Checking $SVC.service and $SVC.timer"
if systemctl list-unit-files | grep -q "^$SVC.service"; then
echo " Disabling $SVC.service"
sudo systemctl disable --now "$SVC.service" || true
fi
if systemctl list-unit-files | grep -q "^$SVC.timer"; then
echo " Disabling $SVC.timer"
sudo systemctl disable --now "$SVC.timer" || true
fi
done
# Extra: Stop legacy service if still running
echo "==> Stopping legacy avahi-daemon (if running)..."
sudo service avahi-daemon stop || true
log "Final cleanup..."
sudo apt-get autoremove -y -q || true
sudo apt-get autoclean -y -q || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment