Skip to content

Latest commit

 

History

History
248 lines (158 loc) · 5.63 KB

pacman.md

File metadata and controls

248 lines (158 loc) · 5.63 KB

Pacman

Description

The pacman package manager is one of the major distinguishing features of Arch Linux. It combines a simple binary package format with an easy-to-use Arch build system. The goal of pacman is to make it possible to easily manage packages, whether they are from the official repositories or the user's own builds.

Directory

References


Configuration

Description

This details some configuration options for improving the package manager.

References

Update Mirror List

The package manager relies on the list of mirrors to download the latest packages.

  1. Use reflector to update the system's mirror list and sort them by speed:

    sudo reflector --latest 50 --protocol https --sort rate --save /etc/pacman.d/mirrorlist

    [!TIP]
    Remove sudo if you are running as the root user.

Enable Parallel Downloads

This details the steps to allow the package manager to download multiple packages in parallel instead of sequentially to speed up the download process.

  1. Update the Pacman configuration file:

    sudo nano /etc/pacman.conf
  2. Make the following changes:

    #ParallelDownloads = 5
    +ParallelDownloads = <number>
    • Comment the original ParallelDownloads line if it is not already commented to override it.

    • Add a new ParallelDownloads line underneath the original with <number> being the number of parallel downloads to allow (range of values from 1 to 5).

    • Example changes:

      #ParallelDownloads = 5
      ParallelDownloads = 5
      
  3. Save the changes to the file.


Install Software

Description

This details the process of installing software.

References

Steps

  1. To install a single package:

    sudo pacman -S <package>

    As an example, to install the vim package:

    sudo pacman -S vim
  2. Optionally, use the --noconfirm flag to automatically answer "yes" to all prompts:

    sudo pacman -S --noconfirm <package>
  3. To install multiple packages in a single command, simply separate each package with a space:

    sudo pacman -S <package1> <package2> <package3>

Update Software

Description

This details the process of updating a software or the system.

References

Steps

  1. To update a particular package or multiple of them, simply reinstall the package(s).

  2. To update the entire system:

    sudo pacman -Syu

Remove Software

Description

This details the process of uninstalling software.

References

Steps

  1. To uninstall a single package along with its dependencies:

    sudo pacman -Rns <package>

    As an example, to uninstall the vim package:

    sudo pacman -Rns vim
  2. Optionally, use the --noconfirm flag to automatically answer "yes" to all prompts:

    sudo pacman -Rns --noconfirm <package>
  3. To uninstall multiple packages in a single command, simply separate each package with a space:

    sudo pacman -Rns <package1> <package2> <package3>

Search Software

Description

This details the process of searching software.

References

Steps

  1. To search for a package:

    pacman -Ss <package>

    As an example, to search for the vim package:

    pacman -Ss vim

Clean Up

Description

This details the process of cleaning up the system.

References

Steps

  1. To remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed:

    sudo pacman -Rns $(pacman -Qdtq)
  2. To delete cached package files of packages that have been installed or removed:

    sudo pacman -Scc