blob: b1acbe2674c9584fa01651b1d6def9a22a5fdcfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  | 
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Pacman Cheat Sheet For Ubuntu Users</title>
        <link rel="shortcut icon" href="/images/favicon.png">
        <link rel="stylesheet" href="/css/site.css">
        <link href="/posts/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts"/>
        <link href="/posts/arch/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Arch"/>
        <link href="/posts/gemini/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Gemini"/>
        <link href="/posts/jigsaw/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Jigsaw"/>
        <link href="/posts/laravel/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Laravel"/>
        <link href="/posts/linux/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Linux"/>
        <link href="/posts/markdown/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Markdown"/>
        <link href="/posts/netlify/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Netlify"/>
        <link href="/posts/nextcloud/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Nextcloud"/>
        <link href="/posts/php/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About PHP"/>
    </head>
    <body>
        <section><h1>Pacman Cheat Sheet For Ubuntu Users</h1><blockquote>Mon 24th August 2020 By David T. Sadler.</blockquote><p>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.</p><pre>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 - |</pre><h2>Install a Package</h2><pre><code class="shell">$ pacman --sync <package name>
$ pacman -S <package name></code></pre><p>Installs a package and its dependencies.</p><h2>Remove a Package</h2><pre><code class="shell">$ pacman --remove --recursive <package name>
$ pacman -Rs <package name></code></pre><p>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.</p><h2>Search For a Package</h2><pre><code class="shell">$ pacman --sync --search <regexp>
$ pacman -Ss <regexp></code></pre><p>Searches in the sync database for packages with a name or description that match the regexp.</p><h2>Upgrade Packages</h2><pre><code class="shell">$ pacman --sync --refresh --sysupgrade
$ pacman -Syu</code></pre><p>Downloads a fresh copy of the master package database and then upgrades all out-of-date packages.</p><h2>Upgrade Distribution</h2><pre><code class="shell">$ pacman --sync --refresh --sysupgrade
$ pacman -Syu</code></pre><p>Since Arch uses a rolling release system there is no distribution version as you just upgrade your packages to their latest versions.</p><h2>Clean Up Local Caches</h2><pre><code class="shell">$ pacman --sync --clean --clean
$ pacman -Scc</code></pre><p>Free up disk space by removing from the cache any packages that are no longer installed. Also removes any cached sync databases.</p><h2>Remove Used Dependencies</h2><pre><code class="shell">$ pacman --query --deps --unrequired --quiet | pacman --remove --recursive -
$ pacman -Qdtq | pacman -Rs -</code></pre><p>Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="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.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section>
        <script defer src="/js/highlight.min.js"></script>
        <script defer src="/js/site.js"></script>
    </body>
</html>
  |