Browse Source

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.
master
Max mal Richtig 11 months ago
parent
commit
450592b3ac
  1. 13
      aptman

13
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"

Loading…
Cancel
Save