For debian and ubuntu, and their derivatives. You will want apt-listbugs and apt-listchanges for the full experience.
Needs work but it shouldn’t destroy your system unless wordpress has munted it or I’ve overlooked something. so no promises.
create an executable bash file with this code and fire away as su/sudo for a menu driven apt-get interface with cruft cleaning capabilities…
#!/bin/bash clear echo Enter Package Name read PKG clear MODE="Normal" showMenu () { echo -e "\E[00;35m$PKG" tput sgr0 echo "Security Mode: $MODE" if [ "$MODE" = "Fast" ] then echo -e "\E[00;33m WARNING: Prompts disabled : BE CAREFUL!!!" tput sgr0 echo "1) Install - Install immediately" echo "2) Remove - Purge package and settings immediately" echo "3) Show - Display package information" echo "4) Identify Bugs - Display bug information" echo "5) Change Log - This doesnt work yet, sorry" echo "6) Reconfigure - Reconfigure package settings" echo "7) Upgrade - Upgrade Debian Immediately" echo "8) DPKG Clean - Remove leftover dependencies and settings" echo "9) DPKG Fix - Attempt to fix broken packages" echo "0) Simulate - Simulate actions - This doesnt work yet, sorry" echo "m) Security Mode - Switch security mode" fi if [ "$MODE" = "SUPER" ] then echo -e "\E[00;31m ACTION FORCED : USE EXTREME CAUTION!!!" tput sgr0 echo "1) Install - Forced install immediately" echo "2) Remove - Forced purge package and settings" echo "3) Show - Display package information" echo "4) Identify Bugs - Display bug information" echo "5) Change Log - This doesnt work yet, sorry" echo "6) Reconfigure - Forced reconfigure package" echo "7) Upgrade - Forced debian upgrade" echo "8) DPKG Clean - Remove orphans and cache" echo "9) DPKG Fix - Fix broken packages" echo "0) Simulate - Simulate actions - This doesnt work yet, sorry" echo "m) Security Mode - Switch security mode" fi if [ "$MODE" = "Normal" ] then echo -e "\E[00;32m User prompts enabled." tput sgr0 echo "1) Install - Install package" echo "2) Remove - Purge package and settings" echo "3) Show - Display package information" echo "4) Identify Bugs - Display bug information" echo "5) Change Log - This doesnt work yet, sorry" echo "6) Reconfigure - Reconfigure package" echo "7) Upgrade - Debian upgrade" echo "8) DPKG Clean - Clean leftovers" echo "9) DPKG Fix - Check for broken packages" echo "0) Simulate - Simulate actions - This doesnt work yet, sorry" echo "m) Security Mode - Switch security mode" fi echo "q) Quit" echo "k) New Query" echo "l) Search" sudo apt-get check echo "Make your selection" } while [ 1 ] do showMenu read -n1 CORE case "$CORE" in "1") clear echo "Installing $PKG." apt-cache show $PKG sudo apt-get update if [ "$MODE" = "Normal" ] then sudo apt-get --no-install-recommends install $PKG fi if [ "$MODE" = "Fast" ] then sudo apt-get install $PKG fi if [ "$MODE" = "SUPER" ] then sudo apt-get -f install $PKG fi ;; "2") clear echo "Removing $PKG." if [ "$MODE" = "Normal" ] then sudo apt-get purge $PKG fi if [ "$MODE" = "Fast" ] then sudo apt-get -y purge $PKG fi if [ "$MODE" = "SUPER" ] then sudo apt-get purge -f $PKG fi sudo apt-get -y autoremove sudo dpkg --purge $(dpkg --get-selections|grep deinstall|awk '{print $1}') ;; "3") clear apt-cache show $PKG ;; "4") clear echo "Checking $PKG for bugs." apt-listbugs -s all list $PKG ;; "5") clear #echo "Showing $PKG changelog." #apt-listchanges -f -v --apt $PKG -something something? echo "This doesnt work yet, sorry" ;; "6") clear echo "Reconfiguring $PKG." if [ "$MODE" = "Normal" ] then sudo dpkg-reconfigure $PKG fi if [ "$MODE" = "Fast" ] then sudo dpkg-reconfigure $PKG fi if [ "$MODE" = "SUPER" ] then sudo dpkg-reconfigure -u $PKG fi ;; "7") clear echo "Upgrading Debian!" sudo apt-get update if [ "$MODE" = "Normal" ] then sudo apt-get dist-upgrade fi if [ "$MODE" = "Fast" ] then sudo apt-get -y dist-upgrade fi if [ "$MODE" = "SUPER" ] then sudo apt-get -f dist-upgrade fi ;; "8") echo "Removing leftover files" if [ "$MODE" = "Normal" ] then sudo apt-get autoremove sudo dpkg --purge $(dpkg --get-selections|grep deinstall|awk '{print $1}') fi if [ "$MODE" = "Fast" ] then sudo apt-get -y autoremove sudo dpkg --purge $(dpkg --get-selections|grep deinstall|awk '{print $1}') fi if [ "$MODE" = "SUPER" ] then sudo apt-get -y autoremove sudo deborphan | sed 's/$/ purge/' | dpkg --set-selections sudo deborphan | sed 's/$/ remove/' | dpkg --set-selections sudo dpkg --purge $(dpkg --get-selections|grep deinstall|awk '{print $1}') sudo apt-get autoclean fi ;; "9") clear echo "Attempting to fix DPKG" if [ "$MODE" = "Normal" ] then sudo apt-get -f install fi if [ "$MODE" = "Fast" ] then sudo apt-get -f -y install fi if [ "$MODE" = "SUPER" ] then sudo apt-get -f -m -y install fi ;; "k") clear echo Enter Package Name read PKG ;; "m") clear if [ "$MODE" = "Normal" ] then MODE="Fast" else if [ "$MODE" = "Fast" ] then MODE="SUPER" else if [ "$MODE" = "SUPER" ] then MODE="Normal" fi fi fi ;; "l") clear echo Enter search Query: read SEARCH apt-cache search $SEARCH ;; "q") clear exit :: esac done