summaryrefslogtreecommitdiff
path: root/gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2021-05-17 15:59:24 +0100
committerDavid T. Sadler <davidtsadler@googlemail.com>2021-05-17 15:59:24 +0100
commitbbf7974715b9a43bab207df75ef69209cdf13850 (patch)
tree13078ed02a7fec8f28b1d6046e6533f1be2aec54 /gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi
parent3e9a949c823917e0f4189628959fa4d3eb908db4 (diff)
Move to building localy rather than on remote server
Diffstat (limited to 'gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi')
-rw-r--r--gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi103
1 files changed, 103 insertions, 0 deletions
diff --git a/gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi b/gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi
new file mode 100644
index 0000000..3615d0b
--- /dev/null
+++ b/gemini/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.gmi
@@ -0,0 +1,103 @@
+# Pacman Cheat Sheet For Ubuntu Users
+
+> Mon 24th August 2020 By David T. Sadler.
+
+As a regular Ubuntu user I am used to using apt for system maintenance. But now that I've installed Arch Linux I will be using pacman and so below is a cheat sheet for myself that shows the pacman equivalent of some common apt actions.
+
+```
+Action | Apt | Pacman |
+---------------------------|--------------------------------|----------------------------|
+Install a package | apt install <package name> | pacman -S <package name> |
+Remove a package | apt remove <package name> | pacman -Rs <package name> |
+Search for a package | apt serch <search term> | pacman -Ss <regexp> |
+Upgrade packages | apt update && apt upgrade | pacman -Syu |
+Upgrade distribution | apt update && apt dist-upgrade | pacman -Syu |
+Clean up local caches | apt autoclean | pacman -Scc |
+Remove unused dependencies | apt autoremove | pacman -Qmq | pacman -Rs - |
+```
+
+## Install a Package
+
+```shell
+$ pacman --sync <package name>
+
+$ pacman -S <package name>
+```
+
+Installs a package and its dependencies.
+
+## Remove a Package
+
+```shell
+$ pacman --remove --recursive <package name>
+
+$ pacman -Rs <package name>
+```
+
+Removes a package and all its dependencies, provided that (A) they are not required by other packages; and (B) they were not explicitly installed by the user.
+
+## Search For a Package
+
+```shell
+$ pacman --sync --search <regexp>
+
+$ pacman -Ss <regexp>
+```
+
+Searches in the sync database for packages with a name or description that match the regexp.
+
+## Upgrade Packages
+
+```shell
+$ pacman --sync --refresh --sysupgrade
+
+$ pacman -Syu
+```
+
+Downloads a fresh copy of the master package database and then upgrades all out-of-date packages.
+
+## Upgrade Distribution
+
+```shell
+$ pacman --sync --refresh --sysupgrade
+
+$ pacman -Syu
+```
+
+Since Arch uses a rolling release system there is no distribution version as you just upgrade your packages to their latest versions.
+
+## Clean Up Local Caches
+
+```shell
+$ pacman --sync --clean --clean
+
+$ pacman -Scc
+```
+
+Free up disk space by removing from the cache any packages that are no longer installed. Also removes any cached sync databases.
+
+## Remove Used Dependencies
+
+```shell
+$ pacman --query --deps --unrequired --quiet | pacman --remove --recursive -
+
+$ pacman -Qdtq | pacman -Rs -
+```
+
+Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.
+
+### Links
+
+=> /posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/ Installing Arch Linux on a Thinkpad X220.
+
+=> /posts/arch/ Arch - Read More Posts.
+
+I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
+
+=> mailto:david@davidtsadler.com Email david@davidtsadler.com
+
+=> https://creativecommons.org/licenses/by-sa/4.0/ The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
+
+Copyright © 2021 David T. Sadler.
+
+=> / Return to Homepage.