diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2020-08-24 15:53:33 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2020-08-24 15:53:33 +0100 |
| commit | f61e417a035a6e7648c7e774d539da6afd35f0e7 (patch) | |
| tree | 0e6f4b481b30d4dacee9395bb7bf3d59adab61db | |
| parent | a0d386d7e1438b687a6c973e7bfbfc35279822cc (diff) | |
Add Pacman Cheat Sheet For Ubuntu Users
| -rw-r--r-- | source/_posts/learning_arch_linux.md | 4 | ||||
| -rw-r--r-- | source/_posts/pacman_cheat_sheet_for_ubuntu_users.md | 92 |
2 files changed, 95 insertions, 1 deletions
diff --git a/source/_posts/learning_arch_linux.md b/source/_posts/learning_arch_linux.md index b85301f..5575916 100644 --- a/source/_posts/learning_arch_linux.md +++ b/source/_posts/learning_arch_linux.md @@ -13,4 +13,6 @@ Collected here are the posts about using Arch Linux on my Thinkpad X220. This is - [Installing Arch Linux on a Thinkpad X220](/posts/installing-arch-linux-on-a-x220-thinkpad/) - [Adding a User in Arch Linux](/posts/adding-a-user-in-arch-linux/) - +- [Granting Sudo Access to a User in Arch Linux](/posts/granting-sudo-access-to-a-user-in-arch-linux/) +- [Installing ST, DMENU and DWM in Arch Linux](/posts/installing-st-dmenu-and-dwm-in-arch-linux/) +- [Pacman Cheat Sheet For Ubuntu Users](/posts/pacman-cheat-sheet-for-ubuntu-users/) diff --git a/source/_posts/pacman_cheat_sheet_for_ubuntu_users.md b/source/_posts/pacman_cheat_sheet_for_ubuntu_users.md new file mode 100644 index 0000000..53907d9 --- /dev/null +++ b/source/_posts/pacman_cheat_sheet_for_ubuntu_users.md @@ -0,0 +1,92 @@ +--- +extends: _layouts.post +section: content +title: Pacman Cheat Sheet For Ubuntu Users +date: 2020-08-24 +description: My Pacman cheat sheet for Ubuntu Users. +tags: [Arch] +--- + +As a regular Ubuntu user I am used to using *apt* for system maintenance. But now that I've installed [Arch Linux](/posts/installing-arch-linux-on-a-x220-thinkpad/) 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. |
