From 450592b3acfffaf85e94a3e930d7e4240b74e40b Mon Sep 17 00:00:00 2001 From: Max mal Richtig Date: Tue, 13 Feb 2024 14:04:14 +0100 Subject: [PATCH] Make 'remove' more consistent with original 'apt' behaviour Do NOT remove dependencies by default. Instead prompt the user with info about how to remove dependencies. --- aptman | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/aptman b/aptman index 13bb68d..ff23247 100644 --- a/aptman +++ b/aptman @@ -15,11 +15,10 @@ then fi -cmd="$1" +cmd="$1" # catch first arguments with $1 shift # drop the first argument from "$@" -# catch first arguments with $1 case "$cmd" in update) # Update local package repo/cache @@ -43,12 +42,14 @@ case "$cmd" in ;; remove) # Remove package and its dependencies - echo "Removing '$@' and dependencies ..." - pacman -Rs "$@" + echo "Removing '$@' ..." + pacman -R "$@" + echo "If you want to remove unused dependencies, run 'aptman autoremove'" + echo "or consider 'aptman purge [PKG]' next time." ;; autoremove) # Remove orphaned packages - echo "Removing orphaned packages" + echo "Removing orphaned packages ..." pacman -Qdtq | pacman -Rs - ;; purge) @@ -93,7 +94,7 @@ case "$cmd" in echo "install | reinstall - (re)Install packages" echo "remove - Uninstall package" echo "autoremove - Uninstalling orphaned packages" - echo "purge - Uninstall package and clean config" + echo "purge - Uninstall package, dependencies and clean config" echo "check - Check for broken dependencies" echo "search - Search package" echo "show - Show package info"