Home Package management How To List Installed Packages That Belong To A Particular Group In Linux

How To List Installed Packages That Belong To A Particular Group In Linux

By sk
Published: Updated: 3.9K views

As you may already know, a package group is a collection of packages that serve a common purpose. For example, the mate-desktop package group installs all the packages related to the MATE desktop environment. All Linux package managers have the capability to install a group of packages at once. In this tutorial, we will learn how to list the installed packages that belong to a particular group in Linux.

List Installed Packages that belong to a Particular Group in Linux

Before testing these commands given below, make sure you have installed some package groups in your Linux box.

On Arch Linux and derivatives

In Arch Linux and its derivatives like EndeavourOS, Manjaro Linux, the following command displays the installed packages belong to the MATE package group.

$ sudo pacman -Qg mate

Sample output:

mate caja
mate marco
mate mate-backgrounds
mate mate-control-center
mate mate-desktop
mate mate-icon-theme
mate mate-menus
mate mate-notification-daemon
mate mate-panel
mate mate-polkit
mate mate-session-manager
mate mate-settings-daemon
mate mate-themes
mate mate-user-guide

Similarly, the following command displays the installed packages belong to LXDE package group.

$ sudo pacman -Qg lxde

Please note that the above commands will only display the installed packages of a package group.

To list all packages belong to a group from the online repository, run:

$ sudo pacman -Sg lxde

For more details, refer the getting started with Pacman guide.

Also, refer man pages.

$ man pacman

On RPM based systems like Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux

For Fedora and other RPM-based distributions like CentOS or RHEL, package groups can be managed with dnf or yum.

List available groups:

$ sudo dnf group list

Show packages in a specific group:

$ sudo dnf group info "GroupName"

Replace "GroupName" with the actual name of the group.

In older RHEL-based Linux systems, use yum instead of dnf.

For instance, run the following command to list the installed packages belong to a group called "Web Server":

# yum groups info "Web Server"

Sample output:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: mirror.vinahost.vn
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net

Group: Web Server
 Group-Id: web-server
 Description: Allows the system to act as a web server, and run Perl and Python web applications.
 Mandatory Packages:
 Default Packages:
 Optional Packages:

As you see in the above output, the packages are marked with different symbols.

  • " = " : Package is installed and it was installed as a part of the package group.
  • " + " : Package is not installed but it will be installed on the next yum upgrade or yum group upgrade.
  • " - " : Package is not installed and it will not be installed as a part of the package group.
  • no symbol : Package is installed but it was installed outside of the package group. This means that the yum group remove command will not remove these packages.

For more details, refer man pages.

# man yum

On Debian, Ubuntu systems

In DEB based systems, Package groups are known as "tasks". Tasks are predefined collections of software.

To view the list of available tasks, run:

$ tasksel --list-task

Sample output:

u manual Manual package selection
u kubuntu-live Kubuntu live CD
u lubuntu-live Lubuntu live CD
u ubuntu-gnome-live Ubuntu GNOME live CD
u ubuntu-live Ubuntu live CD
u ubuntu-mate-live Ubuntu MATE Live CD
u ubuntustudio-dvd-live Ubuntu Studio live DVD
u ubuntustudio-live Ubuntu Studio live CD
u xubuntu-live Xubuntu live CD
u cloud-image Ubuntu Cloud Image (instance)
u dns-server DNS server
u edubuntu-desktop-gnome Edubuntu desktop
u kubuntu-desktop Kubuntu desktop
u kubuntu-full Kubuntu full
u lamp-server LAMP server
u lubuntu-core Lubuntu minimal installation
u lubuntu-desktop Lubuntu Desktop
u mail-server Mail server
u mythbuntu-backend-master Mythbuntu master backend
u mythbuntu-backend-slave Mythbuntu slave backend
u mythbuntu-desktop Mythbuntu additional roles
u mythbuntu-frontend Mythbuntu frontend
u postgresql-server PostgreSQL database
u samba-server Samba file server
u tomcat-server Tomcat Java server
u ubuntu-desktop Ubuntu desktop
u ubuntu-gnome-desktop Ubuntu GNOME desktop
u ubuntu-mate-cloudtop Ubuntu MATE cloudtop
u ubuntu-mate-core Ubuntu MATE minimal installation
u ubuntu-mate-desktop Ubuntu MATE desktop
u ubuntu-usb Ubuntu desktop USB
u ubuntustudio-audio Audio recording and editing suite
u ubuntustudio-desktop Ubuntu Studio desktop
u ubuntustudio-desktop-core Ubuntu Studio minimal DE installation
u ubuntustudio-font-meta Large selection of font packages
u ubuntustudio-graphics 2D/3D creation and editing suite
u ubuntustudio-photography Photograph touchup and editing suite
u ubuntustudio-publishing Publishing applications
u ubuntustudio-video Video creation and editing suite
u virt-host Virtual Machine host
u xubuntu-core Xubuntu minimal installation
u xubuntu-desktop Xubuntu desktop
i openssh-server OpenSSH server
i server Basic Ubuntu server

Here, the letters 'u' and 'i' indicates the uninstalled/not installed and installed tasks. As you see in the above output, I have two installed tasks namely 'openssh-server' and 'server'. Now, let us go back to the topic.

To list the packages that belong to any package groups (i.e tasks), for example openssh-server, run:

$ aptitude show openssh-server

This command will list the packages that would be installed by that task.

Sample output:

Package: openssh-server 
State: installed
Automatically installed: no
Multi-Arch: foreign
Version: 1:7.2p2-4ubuntu2.1
Priority: optional
Section: net
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Uncompressed Size: 912 k
Depends: libaudit1 (>= 1:2.2.1), libc6 (>= 2.17), libcomerr2 (>= 1.01),
 libgssapi-krb5-2 (>= 1.12.1+dfsg-2), libkrb5-3 (>= 1.13~alpha1+dfsg),
 libpam0g (>=, libselinux1 (>= 1.32), libssl1.0.0 (>= 1.0.2),
 libsystemd0, libwrap0 (>= 7.6-4~), zlib1g (>= 1:1.1.4), debconf (>=
 0.5) | debconf-2.0, init-system-helpers (>= 1.18~), lsb-base (>=
 4.1+Debian11ubuntu7), openssh-client (= 1:7.2p2-4ubuntu2.1),
 libpam-runtime (>= 0.76-14), libpam-modules (>= 0.72-9), adduser (>=
 3.9), dpkg (>= 1.9.0), procps, openssh-sftp-server
Recommends: xauth, ncurses-term, ssh-import-id
Suggests: ssh-askpass, rssh, molly-guard, ufw, monkeysphere
Conflicts: sftp, ssh-socks, ssh2, openssh-server:i386
Replaces: ssh, ssh:i386, ssh-krb5, ssh-krb5:i386
Provides: openssh-server:i386 (= 1:7.2p2-4ubuntu2.1), ssh-server,
Provided by: openssh-server:i386 (1:7.2p2-4), openssh-server:i386
Description: secure shell (SSH) server, for secure access from remote machines
 This is the portable version of OpenSSH, a free implementation of the Secure
 Shell protocol as specified by the IETF secsh working group. 

For more details, refer the man pages:

$ man apt


In SUSE/openSUSE distros, the group of softwares are known as patterns.

To find out which packages belong to a pattern, use "if" or "info" as shown below:

$ zypper if -t pattern <pattern_name>


$ zypper pattern-info <pattern_name>

Say for example, the following command displays the packages belong to a pattern called lamp_server.

$ zypper pattern-info lamp_server

For more details, refer man pages:

$ man zupper


In this brief tutorial, we discussed how to list installed packages packages that belong to a package group in different Linux distributions.

Package groups in Linux help you manage multiple related software programs at once. This makes it easier to set up and update systems, keep everything running smoothly, and fix problems when they arise. It's especially handy for people who manage lots of computers or need to set up specific types of software quickly.

Related Read:

You May Also Like


Dan St.André May 2, 2017 - 10:59 pm

I run the Linux Mint variant of the Debian–>Ubuntu family of distributions. I have had troubles in the past running ‘tasksel’. For whatever reason, packages were flagged for removal or purging. Some were removed/purged immediately. Some waited until the next time I apt, synaptic, or mintupdate. Regardless, my workstation became unstable an I needed to reinstall the distro. I never did learn what provoked this behavior. I can only guess that something caused the underlying package management and tasksel to lose their minds.

Backup thy data!

SK May 3, 2017 - 12:27 pm

“Backup thy data!” – Very good advice. I completely agree with you.


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More