From 5959ff91abd87fa4c871bf6e43cf6c8461170b4b Mon Sep 17 00:00:00 2001 From: Max mal Richtig Date: Mon, 8 Jan 2024 18:44:30 +0100 Subject: [PATCH] Adding 'autoremove' command to get rid of orphaned packages --- aptman | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aptman b/aptman index 99331e8..13bb68d 100644 --- a/aptman +++ b/aptman @@ -46,6 +46,11 @@ case "$cmd" in echo "Removing '$@' and dependencies ..." pacman -Rs "$@" ;; + autoremove) + # Remove orphaned packages + echo "Removing orphaned packages" + pacman -Qdtq | pacman -Rs - + ;; purge) # Remove package, dependencies and all of the config files echo "Removing '$@', configurations and dependencies ..." @@ -87,6 +92,7 @@ case "$cmd" in echo "upgradeable - List upgradeable packages" echo "install | reinstall - (re)Install packages" echo "remove - Uninstall package" + echo "autoremove - Uninstalling orphaned packages" echo "purge - Uninstall package and clean config" echo "check - Check for broken dependencies" echo "search - Search package"