Installing pacman arch linux

Pacman Command in Arch Linux

I’ve recently started using a Arch Linux distribution Garuda Linux and the package management tool is pacman this article summarizes the most common actions with based on the following article from GeeksforGeeks.

Intro

Pacman is a package manager for the arch Linux and arch-based Linux distributions. If you have used Debian-based OS like ubuntu, then the Pacman is similar to the apt command of Debian-based operating systems. Pacman contains the compressed files as a package format and maintains a text-based package database. Pacman keeps the system up to date by synchronizing package lists with the master server. Pacman can install the packages from the official repositories or your own build packages.

Installing Packages using the Pacman

When we install any new operating system on our machine, the first task we do is to install the software packages on the system. Now, to install the packages on Arch Linux, use the command Pacman with -S option and mention the package name. The -S option tells the Pacman to synchronize and to continue. Here is one example

We can mention the many package names after the -S option, separated by space.

sudo pacman -S package1 package2 package3

Then Pacman will show the download and install size of the package and ask for to proceed, then simply press the Y key. Pacman categorizes the installed packages into two categories.

  • Implicitly Installed: The package that was installed using the -S or -U option.
  • Dependencies: The package is installed because it is required by another package.

Removing packages using the Pacman

When we don’t need the package anymore, then we should remove the package from the system. To remove the package with all its dependencies which are not required by other packages, use the following command:

Читайте также:  Arch linux дисплей менеджер

To remove the package without removing its dependency use the following command:

To remove the dependencies which are not required anymore, use the following command:

Upgrading packages

In arch Linux, we can upgrade the full system by only one command using the Pacman. Use the following command to update the system:

Let’s understand the meaning, S tell the pacman to synchronize the local database with the main database. u tells the pacman to upgrade the packages and y update the local catch on the system. Basically, this command synchronizes the local pacman database with the main repository database and then updates the system.

Searching for a Package

Now let’s see how we can search the package into the database of pacman. To search query in the name and description of the package in the database use the following command:

To search into already installed packages on the system, use the following command:

To search the query into the local database use the following command:

Cleaning the Package Cache

When pacman downloads the packages it stores the packages into the /var/cache/pacman/pkg/ and while uninstalling the package pacman does not delete these files. Pacman uses these files to downgrade the package or install the package. But it can take a lot of space to store these packages. So to delete the stored packages, use the following command:

To remove all stored packages and cache, use the following command:

Installing local packages

By using pacman we can install packages other than the main repository of Arch Linux. Use the following command to install the packages

sudo pacman -U path_to_file.pkg.tar.xz

sudo pacman -U http://www.example.com/repo/example.pkg.tar.xz

Troubleshooting

Sometimes installing the packages with pacman we face some errors. Following are the mainly occurred errors with pacman:

  • Conflicting file error: This error occurs due to some conflict packages present in the repository. To solve this error we can manually rename the file or force the overwrite function. We can use the following command to overwrite the function:
    • pacman -S —overwrite glob package

    Garuda

    Garuda also brings a useful command update that abstracts all this interactions to keep your rolling system updated, still very important to understand the command line utilities to manage the packages and check the official man page for further details as this is always evolving.

    Reference

    Источник

    ArchPKGs

    Installing pacman-static (Step-by-Step Guide) on Arch Linux, Manjaro and Parabola

    «Statically-compiled pacman (to fix or install systems without libc)» is the maintainer’s outline of pacman-static . To get this package ( pacman-static ) from AUR (Arch User Repository) on Arch Linux and Arch-based Linux distributions (e.g. Manjaro, EndeavourOS, ArcoLinux, Parabola, BlackArch) is pretty simple. This guide will be covering how to install, update and remove the package with either the built-in package manager pacman or an AUR helper (e.g. yay ).

    Table of Contents

    Two typical ways are used to install pacman-static from AUR. pacman is what you’re looking for if you are a veteran in Arch Linux and have the knowledge of how packages are built. If not, yay is a convenient alternative to install packages without the hassle of reviewing PKGBUILD and build packages with makepkg on your own.

    sudo pacman -S --needed git && git clone https://aur.archlinux.org/pacman-static.git && cd pacman-static && makepkg -si
    1. Install git if it’s not on your system.
    2. clone the package’s git repository from AUR.
    3. cd into the directory of the repository.
    4. Build the package with makepkg . Also, it will automatically be installed with pacman if built successfully.
    yay -S pacman-static

    Just like installing AUR packages, updating them is fairly the same. Simply pull it from upstream then re-build it. Even so, it is still recommended to upgrade your whole system first with sudo pacman -Syu before updating any packages to avoid dependency issues, since Arch is a rolling-release Linux distro.

    Before running the command, make certain you’re in the directory of the repository you previously cloned:

    git pull && makepkg -si
    1. pull from the package’s git repository.
    2. Use makepkg to build the package. Also, it will automatically be updated with pacman if built successfully.

    Compared to installing and updating packages, uninstalling is the easiest of these three,just choose whether to purge the unused dependencies and the configuration files used by the package.

    sudo pacman -R pacman-static
    sudo pacman -Rs pacman-static
    sudo pacman -Rns pacman-static
    yay -R pacman-static
    yay -Rs pacman-static
    yay -Rns pacman-static

    Learn more details about how to install and update AUR packages on Arch-based distros, please refer to Two Ways to Install Packages from AUR on Arch Linux/Manjaro from NoCache.

    Beginner’s Guide on Installing python-munch on Arch Linux, Manjaro and ArcoLinux

    extra/python-munch is «A dot-accessible dictionary (a la JavaScript objects)» according to its own definition. To get this package (extra/python-munch) from Arch official repository (Extra) on Arch Linux, Manjaro, EndeavourOS, ArcoLinux and Artix is comparatively uncomplicated. This guide will show you step-by-step how to install, update and remove the package with either the default package manager pacman or an AUR helper like yay.

    How to Install nfs-utils-rdma-server (Step-by-Step Instructions) on Arch Linux (Manjaro, Anarchy)

    nfs-utils-rdma-server is «Load kernel module for NFS server using RDMA, and configure RDMA port» quoting from its own outline. To install nfs-utils-rdma-server from AUR (Arch User Repository) on Arch Linux and Arch-based distros (e.g. Manjaro, EndeavourOS, Artix, RebornOS, Garuda, Anarchy) is quite simple. This guide will be covering how to install, update and remove the package with either the default package manager pacman or an AUR helper (e.g. yay).

    librewolf-comment-out-cfg-hook Install, Update and Remove Tutorial on Arch Linux/Manjaro/Parabola

    librewolf-comment-out-cfg-hook is «Comment out custom cfg values via pacman hook» according to its profile. To install librewolf-comment-out-cfg-hook from AUR (Arch User Repository) on Arch Linux, Manjaro, EndeavourOS, RebornOS, Anarchy and Garuda is fairly easy. This guide will cover how to install/update/remove the package with either the default package manager pacman or an AUR helper like yay.

    A Complete Guide on amlite Installation on Arch Linux (Manjaro, Garuda)

    Based on amlite’s own outline, it is «AmScope software». To install amlite from AUR (Arch User Repository) on Arch Linux and Arch-based distributions (e.g. Manjaro, EndeavourOS, Garuda) is quite simple. This guide will cover how to install, update and uninstall the package with either the built-in package manager pacman or an AUR helper like yay.

    How to Install obs-captions-plugin-bin with Command Line on Arch Linux/Manjaro/RebornOS

    Based on obs-captions-plugin-bin’s profile, it’s «Standalone OBS Studio plugin providing closed captioning via Google Cloud Speech Recognition API». To install this package (obs-captions-plugin-bin) from AUR (Arch User Repository) on Arch Linux, Manjaro, EndeavourOS, RebornOS, Artix and BlackArch is pretty uncomplicated. This guide will cover how to install, update and remove the package with either the default package manager pacman or an AUR helper like yay.

    How to Install perl-test-modern with Command Line on Arch-Based Linux (Manjaro/BlackArch)

    perl-test-modern is «precision testing for modern perl» according to its own description. To get this package (perl-test-modern) from AUR (Arch User Repository) on Arch Linux and Arch-based distributions (e.g. Manjaro, EndeavourOS, Parabola, Garuda) is pretty straightforward. This tutorial will show you step-by-step how to install, update and remove the package with either the default package manager pacman or an AUR helper like yay.

    More guides… copyright 2023 ArchPKGs. All Rights Reserved.

    Источник

Оцените статью
Adblock
detector