summaryrefslogtreecommitdiff
path: root/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html')
-rw-r--r--www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html b/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html
new file mode 100644
index 0000000..e11103e
--- /dev/null
+++ b/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html
@@ -0,0 +1,45 @@
+<!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 &lt;package name&gt; | pacman -S &lt;package name&gt; |
+Remove a package | apt remove &lt;package name&gt; | pacman -Rs &lt;package name&gt; |
+Search for a package | apt serch &lt;search term&gt; | pacman -Ss &lt;regexp&gt; |
+Upgrade packages | apt update &amp;&amp; apt upgrade | pacman -Syu |
+Upgrade distribution | apt update &amp;&amp; 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 &lt;package name&gt;
+
+$ pacman -S &lt;package name&gt;</code></pre><p>Installs a package and its dependencies.</p><h2>Remove a Package</h2><pre><code class="shell">$ pacman --remove --recursive &lt;package name&gt;
+
+$ pacman -Rs &lt;package name&gt;</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 &lt;regexp&gt;
+
+$ pacman -Ss &lt;regexp&gt;</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><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>
+ </body>
+</html>