From f708b923111c987b874da6f9700f3de168374858 Mon Sep 17 00:00:00 2001 From: Angad Singh Grover <127680876+angadsgrover@users.noreply.github.com> Date: Sat, 16 Nov 2024 20:11:41 +0800 Subject: [PATCH] pacman-r: add alias page; pacman-remove: update page (#14807) --- pages/linux/pacman-r.md | 7 +++++++ pages/linux/pacman-remove.md | 28 ++++++++++++++-------------- scripts/wrong-filename.sh | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 pages/linux/pacman-r.md diff --git a/pages/linux/pacman-r.md b/pages/linux/pacman-r.md new file mode 100644 index 000000000..7be94d3e6 --- /dev/null +++ b/pages/linux/pacman-r.md @@ -0,0 +1,7 @@ +# pacman -R + +> This command is an alias of `pacman --remove`. + +- View documentation for the original command: + +`tldr pacman remove` diff --git a/pages/linux/pacman-remove.md b/pages/linux/pacman-remove.md index 936bf6230..2e76d552e 100644 --- a/pages/linux/pacman-remove.md +++ b/pages/linux/pacman-remove.md @@ -4,30 +4,30 @@ > See also: `pacman`. > More information: . -- Remove a package and its dependencies: +- [R]emove a package and its dependencies recur[s]ively: -`sudo pacman --remove --recursive {{package}}` +`sudo pacman -Rs {{package}}` -- Remove a package and both its dependencies and configuration files: +- [R]emove a package and its dependencies. Also do [n]ot save backups of configuration files: -`sudo pacman --remove --recursive --nosave {{package}}` +`sudo pacman -Rsn {{package}}` -- Remove a package without prompting: +- [R]emove a package without prompting: -`sudo pacman --remove --noconfirm {{package}}` +`sudo pacman -R --noconfirm {{package}}` -- Remove orphan packages (installed as dependencies but not required by any package): +- [R]emove orphan packages (installed as [d]ependencies but no[t] required by any package): -`sudo pacman --remove --recursive --nosave $(pacman --query --unrequired --deps --quiet)` +`sudo pacman -Rsn $(pacman -Qdtq)` -- Remove a package and all packages that depend on it: +- [R]emove a package and [c]ascade that to all packages that depend on it: -`sudo pacman --remove --cascade {{package}}` +`sudo pacman -Rc {{package}}` -- List packages that would be affected (does not remove any packages): +- List and [p]rint packages that would be affected (does not [R]emove any packages): -`pacman --remove --print {{package}}` +`pacman -Rp {{package}}` -- Display help: +- Display [h]elp: -`pacman --remove --help` +`pacman -Rh` diff --git a/scripts/wrong-filename.sh b/scripts/wrong-filename.sh index 7ed977d87..d8537fff7 100755 --- a/scripts/wrong-filename.sh +++ b/scripts/wrong-filename.sh @@ -10,7 +10,7 @@ OUTPUT_FILE="inconsistent-filenames.txt" rm -f "$OUTPUT_FILE" touch "$OUTPUT_FILE" -IGNORE_LIST=("exclamation mark" "caret" "dollar sign" "tilde" "history expansion" "qm move disk" "umount" "rename" "pacman s") +IGNORE_LIST=("exclamation mark" "caret" "dollar sign" "tilde" "history expansion" "qm move disk" "umount" "rename" "pacman r" "pacman s") set -e