List Installed Packages with Pacman on Arch Linux

28/12/2020
Chưa phân loại

Pacman is the tool for managing softwares on Arch Linux. It can use Pacman to install, remove, update individual software packages and also update the whole system if you want. You can also find out what software packages are installed on your Arch Linux system using Pacman.

In this article, I will show you how to generate a list of installed packages on your Arch Linux machine with Pacman. Let’s get started.

Why Generate a List of the Installed Packages?

Now you may ask, “hey what’s the point of generating a list of all the installed packages on Arch Linux?”. Well, it is mainly used to report bugs. You may need to send it to Linux experts if you face any problems with your Arch Linux machine that you can’t solve yourself.

You can also generate a list of packages installed on your system and install these in other Arch Linux machine using that list. That’s a lot easier than figuring out manually what is installed on one system.

Generating a List of Installed Packages using Pacman

You can generate a list of all the installed packages of your Arch Linux system with the following command:

$ pacman -Q

You should see something like this.

The package information is divided into 2 columns. The first column is the name of the installed packages and the second column is the version of the installed packages as you can see in the green and blue marked sections respectively in the screenshot below.

The list is quite long. You may want to export it to a file or pass it to a pager like less.

To export the list to a file, run the following command:

$ pacman -Q > my_arch_packages.txt

NOTE: The list should be saved to my_arch_packages.txt file in your current working directory.

Listing Only the Later Installed Packages

You can also generate a list of packages that are installed later (after you installed Arch Linux) using Pacman.

To list later installed or explicit packages, run the following command:

$ pacman -Qe

To leave more system packages, you may filter out more packages with the following command:

$ pacman -Qet

To export the list to a file, just redirect the output as follows:

$ pacman -Qe > packages.txt
or
$ pacman -Qet > packages.txt

Generating a List of Only the Installed Package Names

You can generate a list of all the installed package name. In other words, only the first column using any of the following commands depending on your need:

$ pacman -Q | awk ‘{print $1}’
$ pacman -Qe | awk ‘{print $1}’
$ pacman -Qet | awk ‘{print $1}’

You should see the following outputs:

Also export it to a file packages.txt with one of the following commands depending on your need:

$ pacman -Q | awk ‘{print $1}’ > packages.txt
$ pacman -Qe | awk ‘{print $1}’ > packages.txt
$ pacman -Qet | awk ‘{print $1}’ > packages.txt

That’s how you list installed packages with Pacman on Arch Linux. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to Install Variety Wallpaper Changer in Linux

Variety is an app that changes the wallpaper of your Linux desktop at regular intervals. This app is available for Ubuntu...
28/12/2020

Những câu hỏi thường gặp khi sử dụng proxy và cách trả lời chúng.

Khi bạn cần sử dụng proxy để truy cập vào các trang web bị chặn hoặc giới hạn về địa chỉ...
27/02/2023

Wait Command in Linux

wait is a built-in command of Linux that waits for completing any running process. wait command is used with a particular...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Tìm Hiểu Về Thuê Proxy US – Lợi Ích và Cách Sử Dụng Hiệu Quả
11/12/2024

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024