00CleaningArchLinux.html (3465B)
1 <!DOCTYPE html> 2 <html lang="en-GB"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="author" content="Shipwreckt"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <title>Cleaning Arch Linux</title> 8 <link rel="stylesheet" href="../../../styles.css"> 9 <link rel="icon" href="../../../Images/favi.png" type="image/x-icon"> 10 </head> 11 <body> 12 <header> 13 <nav> 14 <ul> 15 <li><a href="../../../index.html">Home</a></li> 16 <li><a href="../../../links.html">Links</a></li> 17 <li><a href="../../../projects.html">Projects</a></li> 18 <li><a href="../../../contact.html">Contact</a></li> 19 </ul> 20 </nav> 21 </header> 22 <main> 23 <h1>How to Clean Arch Linux 🧹</h1> 24 <h3>Date: 21-7-2024</h3> 25 <p>In this artical I will be telling you how to clean up your <a href="https://archlinux.org">Arch Linux system</a> in the same way I do so.</p> 26 <hr> 27 <h2>Package Cache</h2> 28 <p>The first thing you want to do is clean the Pacman cache, as Pacman does not automatically clean it. This is because Pacman retains the cache in case you need to downgrade a package or reinstall it after uninstalling. To clean the cache, use the following commands:</p> 29 <div class="code-box"> 30 <p>sudo pacman -Sc # Remove packages from cache not installed</p> 31 <p>sudo pacman -Scc # Remove packages from cache both installed and not installed</p> 32 </div> 33 <p>Some people like to automate this task of cleaning the cache with <a href="https://wiki.archlinux.org/title/Pacman#Cleaning_the_package_cache">paccache</a>, but personally I would not because it is something that takes around five minutes max to do. However, it is your choice if you want to do so to avoid the trouble of doing it manually. Regardless of whether you choose to do this manually or automatically, I suggest cleaning the cache monthly. 34 </p> 35 <hr> 36 <h2>Removing Orphan Packages</h2> 37 <p>Orphan packages are those installed as dependencies for other software but are no longer needed. For example, when you install <a href="https://librewolf.net/">LibreWolf</a>, it downloads a package called librewolf-debug as a dependency. Once the installation is complete, librewolf-debug becomes an orphan package because it is no longer used by LibreWolf.</p> 38 39 <div class="code-box"> 40 <p>sudo pacman -Qtdq # Identify orphan packages</p> 41 <p>sudo pacman -Rns $(pacman -Qtdq) # Uninstall orphan packages</p> 42 </div> 43 <p>I suggest uninstalling Orphan packages every month or so, just like cleaning the Pacman cache.</p> 44 <hr> 45 <h2>Cache</h2> 46 <p>Sometimes you want to clean out the ~/.cache directory, as it can accumulate a large number of files from various programs on your system. The cache directory contains temporary files used by different applications to speed up their processes. In general, it is safe to delete all items in this directory, but be cautious if you have specific applications with unusual caching mechanisms. To clean the cache directory run the following command:</p> 47 <div class="code-box"> 48 <p>rm -rf ~/.cache/* # Clear the cache directory</p> 49 </div> 50 <hr> 51 <center> 52 <p>That is all for now, I hope this artical has helped you clean your system.</p> 53 <pre text-align=center> <a href="../../linuxlist.html">Back 🚪</a> 54 </main> 55 </body> 56 </html> 57