Skip to main content

A Guide To Use Pacman Package Manager [Tips/Tricks]

Pacman
The pacman package manager is one of the major distinguishing features of Arch Linux. The goal of pacman is to make it possible to easily manager package, whether they are from the official repository or built by user.

In this guide we will show you how to use pacman effectively to manager all your packages in your Linux systems.

Listing Packages

1. Listing all packages installed in your system

$ pacman -Q

aalib 1.4rc5-13
accountsservice 0.6.54+2+g204a4ab-1
acl 2.2.53-1
adwaita-icon-theme 3.30.1-1
alsa-lib 1.1.7-2
alsa-utils 1.1.7-1
...

2. Listing all foreign packages(manually downloaded and installed packages)

$ pacman -Qm

jmtpfs 0.5-2
ttf-ms-fonts 2.0-10
yaourt 1.9-1
...

3. List all the packages in the group

$ pacman -Sg "your group name"

4. List all packages along with their individual sizes and sort them

$ pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h

1024.00B ca-certificates
1024.00B xorg-font-utils
2048.00B java-environment-common
3.00KiB pambase
3.00KiB vte-common
...

Installing Packages

1. Simple Installation

# pacman -S package_name

2. Install package from a list

# pacman -S --needed - < pkglist.txt

3. Install a downloaded package or a local package

# pacman -U /path/package_name.pkg.tar.xz

Updating Packages

1. Updating your packages to latest version

# pacman -Syu

2. Updating and ignoring a package or a group

The following changes should be done in your configuration file: /etc.pacman.conf

For ignoring a package
IgnorePkg=package_name
For ignoring a group
IgnoreGroup=package_group

Removing Packages

1. Remove a package

# pacman -R package_name

2. Remove a package with dependency that are not being used

# pacman -Rs package_name

3. Removing a package and its configuration files

# pacman -Rn package_name

4. Removing unused packages

# pacman -Rns $(pacman -Qtdq)

Cleaning Packages

1. Cleaning the cache

# pacman -Sc

Comments

Popular posts from this blog

How to format HTML/CSS/JS (or any other) using node.js in Notepad++ in simply easy steps.

Hey guys! Today I am going to tell you on how to use code format / pretty print your HTML / CSS / JS or any other programming language using node modules (Prettier) in notepad++. Before. After. Lets get started! Pre-requisite: you need to have node installed in your computer. You can download it from here . Make sure you have installed node correctly. install notepad++ in your computer. You can download the latest version from here . Step 1. Install Prettier using node. To install Prettier in your system click on Start => cmd. This will open Command prompt. Write this command in Command Prompt.  npm install --save-dev --save-exact prettier To check if prettier is installed correctly type. prettier --check for more info click here. Step 2. Check if nppexec plugin in set in your notepad++ Mostly notepad++ comes with nppexec  by default. Just in case you cannot find nppexec. Check out this amazing blog that tells you step by step how to set up nppexec in your notepad++.  https://www.v

CRUD Operation in SAPUI5. Part 3: Fragments and Update Operation

 CRUD Operation in SAPUI5 Part 3: Fragment and Update Operation We have covered Create and Display operation in our previous article. If you have not checked that I highly recommend you to check that before starting this article for better understanding. Link:  Part 2: Create and Display

CRUD Operation in SAPUI5 Part 2: Create and Display using Input and Table

 CRUD Operation in SAPUI5 Part 2: Create and Display in Table In my previous article we discussed the brief introduction about SAPUI5, MVC architecture and we developed a simple user interface with input and tables. In this article we will discuss the Model and Controller from the MVC architecture. If you have not seen the first part I highly recommend you to see that first. Link:  Part 1: Intro and UI Design