How to view the list of installed Gentoo packages

10.03.2021
22:05

In some cases, you may need to view a list of installed packages called Gentoo. This is often required to clean the system of unnecessary files, to migrate programs, and for a number of other reasons. There are tons of utilities and scripts to solve this problem. We will not consider them all, we will focus attention only on the most effective and justified methods.

Viewing the World file

When you are faced with such a task as viewing Gentoo files, the first place you should go is /var/lib/portage/world. This is where all the user programs manually installed are recorded. To do this, run the command:

$ cat /var/lib/portage/world

Using EIX

When you want to see all the installed Gentoo packages, you need another way. The Eix Gentoo script, Eix Gentoo, is an entire set of utilities to help you find and manage packages in overlays and Portage. Since we are only interested in the function that shows all packages, we use it:

$ emerge -pv eix

Next, we look at the packages themselves:

$ eix -I | less

You will see the name of the package itself and brief information about it:

[?] app-accessibility/at-spi2-atk

Available versions: (2) 2.10.2 ~2.12.1{tbz2}

{test}

Installed versions: 2.14.1(2){tbz2}(02:45:46 28.03.2015)(-test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")

Homepage: http://live.gnome.org/Accessibility

Description: Gtk module for bridging AT-SPI to Atk

Using EPM

You can also use perl scripts to view installed packages. A great one is EPM, which installs like this:

$ sudo emerge -av epm

Now get the packages:

$ epm -qa

This will display information about the package - its name and version:

fixesproto-5.0-r1

xcmiscproto-1.2.2

compositeproto-0.4.2-r1

xf86rushproto-1.1.2-r1

xf86driproto-2.1.1-r1

recordproto-1.14.2-r1

damageproto-1.2.1-r1

presentproto-1.0

dri2proto-2.8-r1

xproto-7.0.27

You can filter only AWK package names with a special function:

$ epm -qa | awk -F- '{print $1}'

That's all. There are indeed many ways. Use any of them depending on the circumstances and tasks at hand.

15% discount on new VPS
Hurry up to order a server in any location
Choose a VPS

Other articles

10.03.2021
6 857
Knowledge base / Instructions
Installing Atom on an Ubuntu system
10.03.2021
23 597
Knowledge base / Instructions
Ошибка 2006: MySQL Server has gone away
10.03.2021
31 762
Knowledge base / Instructions
How to restart the network in Ubuntu