Desktop environment ยท surgical cleanup

KDE Plasma

Pick which bundled apps to remove from a bigger checklist, plus optional Baloo indexing.

Overview

It scans the KDE PIM stack - mail, calendar, contacts - plus LibreOffice, every default KDE game, KDE Connect, media apps, and remote-access tools, then shows a numbered checklist so you decide exactly what gets removed. Baloo's background file indexing is a separate yes/no prompt.

Changes

  • Scans for, if installed: LibreOffice, Akonadi, KMail, KOrganizer, KAddressBook, Kontact, Akregator, Elisa, Dragon Player, Discover, KolourPaint, KTnef, KMines, KSudoku, KPatience, KMahjongg, Kamoso, KDE Connect, Transmission Qt, HexChat, Thunderbird, KRDC, and KGet
  • Shows a numbered checklist of what's actually installed - you choose which numbers to remove, 'all', or skip entirely
  • Separately asks whether to disable Baloo file indexing via balooctl disable

What stays

Plasma Shell, KWin, System Settings, and your panel/widget configuration are untouched. File search still works through other means - you only lose Baloo's content indexing if you say yes to that prompt.

Command

curl -sSL https://debloatme.com/kde | bash

Script source

#!/usr/bin/env bash
#
# DebloatMe - KDE Plasma
# https://debloatme.com/kde
#
# Lets you pick, from a checklist, which bundled apps to remove (KDE
# PIM suite, LibreOffice, and a broader list of common extras) -
# nothing is removed unless you select it - and can disable Baloo file
# indexing.
#
# Reads confirmation prompts from /dev/tty so this still works when the
# script is piped straight from curl (curl ... | bash).
#
# Review this script before running it.

set -euo pipefail

echo "== DebloatMe: KDE Plasma =="
echo "This removes selected apps from the list below - nothing else changes."
read -r -p "Continue? [y/N] " confirm </dev/tty
if [[ ! "$confirm" =~ ^[Yy]$ ]]; then
  echo "Aborted. No changes made."
  exit 0
fi

remove_pkg() {
  local pkg="$1"
  if command -v dpkg >/dev/null 2>&1 && dpkg -s "$pkg" >/dev/null 2>&1; then
    sudo apt-get -y purge "$pkg" || true
  elif command -v pacman >/dev/null 2>&1 && pacman -Qi "$pkg" >/dev/null 2>&1; then
    sudo pacman -Rns --noconfirm "$pkg" || true
  elif command -v rpm >/dev/null 2>&1 && rpm -q "$pkg" >/dev/null 2>&1; then
    sudo zypper --non-interactive remove "$pkg" 2>/dev/null || sudo dnf -y remove "$pkg" || true
  fi
}

is_installed() {
  local pkg="$1"
  if command -v dpkg >/dev/null 2>&1 && dpkg -s "$pkg" >/dev/null 2>&1; then return 0; fi
  if command -v pacman >/dev/null 2>&1 && pacman -Qi "$pkg" >/dev/null 2>&1; then return 0; fi
  if command -v rpm >/dev/null 2>&1 && rpm -q "$pkg" >/dev/null 2>&1; then return 0; fi
  return 1
}

echo
echo "-> Scanning for optional installed apps..."

candidate_pkgs=()
candidate_labels=()

check_candidate() {
  local pkg="$1" label="$2"
  if is_installed "$pkg"; then
    candidate_pkgs+=("$pkg")
    candidate_labels+=("$label")
  fi
}

check_candidate "libreoffice" "LibreOffice (full suite)"
check_candidate "akonadi-server" "Akonadi (KDE PIM backend)"
check_candidate "kmail" "KMail"
check_candidate "korganizer" "KOrganizer"
check_candidate "kaddressbook" "KAddressBook"
check_candidate "kontact" "Kontact"
check_candidate "akregator" "Akregator (RSS reader)"
check_candidate "elisa" "Elisa (music player)"
check_candidate "dragonplayer" "Dragon Player"
check_candidate "plasma-discover" "Discover (software center)"
check_candidate "kolourpaint" "KolourPaint"
check_candidate "ktnef" "KTnef"
check_candidate "kaddressbook" "KAddressBook"
check_candidate "kmines" "KMines"
check_candidate "ksudoku" "KSudoku"
check_candidate "kpat" "KPatience"
check_candidate "kmahjongg" "KMahjongg"
check_candidate "kamoso" "Kamoso (webcam booth)"
check_candidate "kdeconnect" "KDE Connect"
check_candidate "transmission-qt" "Transmission Qt (torrent client)"
check_candidate "hexchat" "HexChat (IRC client)"
check_candidate "thunderbird" "Thunderbird (mail client)"
check_candidate "krdc" "KRDC (remote desktop client)"
check_candidate "kget" "KGet (download manager)"

if [[ ${#candidate_pkgs[@]} -eq 0 ]]; then
  echo "   None of the optional apps on the list are installed."
else
  echo
  echo "Optional apps found on this system:"
  for i in "${!candidate_pkgs[@]}"; do
    printf "  [%d] %s\n" "$((i + 1))" "${candidate_labels[$i]}"
  done
  echo
  read -r -p "Enter numbers to remove (space-separated), 'all', or press Enter to skip: " selection </dev/tty

  to_remove=()
  if [[ "$selection" == "all" ]]; then
    to_remove=("${candidate_pkgs[@]}")
  elif [[ -n "$selection" ]]; then
    for n in $selection; do
      idx=$((n - 1))
      if [[ $idx -ge 0 && $idx -lt ${#candidate_pkgs[@]} ]]; then
        to_remove+=("${candidate_pkgs[$idx]}")
      fi
    done
  fi

  if [[ ${#to_remove[@]} -eq 0 ]]; then
    echo "   Nothing selected. Skipping."
  else
    for pkg in "${to_remove[@]}"; do
      echo "   Removing $pkg"
      remove_pkg "$pkg"
    done
  fi
fi

echo
read -r -p "Disable Baloo file indexing? [y/N] " baloo </dev/tty
if [[ "$baloo" =~ ^[Yy]$ ]]; then
  if command -v balooctl >/dev/null 2>&1; then
    balooctl disable
  elif command -v balooctl6 >/dev/null 2>&1; then
    balooctl6 disable
  else
    echo "   balooctl not found, skipping."
  fi
else
  echo "   Skipped."
fi

echo
echo "== Done. KDE Plasma remains installed and functional. =="

rm -- "$0" 2>/dev/null || true

Warning

This script modifies your system

If you rely on Discover as your software-update GUI, selecting it from the checklist removes it - use your terminal package manager afterward, or just leave it unchecked.

  • Self-deletion: this script removes its own temporary downloaded copy after it finishes. That's a cleanup step, not a security feature.
  • Review the source above before running it, especially on a system you can't easily restore.