How To List Installed Packages That Belong To A Particular Group In Linux
A while ago, we have published an article that described how to find installed applications with installed size in Linux. Today, we will see how to list the installed packages that belong to a particular group. As you may already know, all Linux distributions has the ability of installing a group of packages at once. This is what we call Package group. Say for example, the ‘mate-desktop’ package group will install all packages related MATE desktop environment. In a nutshell, Package group is a collection of packages that serve a common purpose.
This brief tutorial describes how to list 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 Antergos, Manjaro Linux, the following command displays the installed packages belong to a MATE package group.
$ sudo pacman -Qg mate
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, run:
$ sudo pacman -Sg lxde
For more details, refer man pages.
$ man pacman
On RPM based systems like RHEL, CentOS, Fedora:
To list the installed packages belong to a group called “Web Server”, run the following command as root user:
# yum groups info "Web Server"
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: =httpd Default Packages: =crypto-utils =httpd-manual =mod_fcgid =mod_ssl Optional Packages: Pound certmonger cherokee libmemcached memcached mod_auth_kerb mod_auth_mellon mod_auth_openidc mod_fcgid mod_nss mod_revocator mod_security mod_security_crs moin perl-CGI perl-CGI-Session plone python-memcached squid zope
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
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.
Package: openssh-server State: installed Automatically installed: no Multi-Arch: foreign Version: 1:7.2p2-4ubuntu2.1 Priority: optional Section: net Maintainer: Ubuntu Developers <[email protected]> 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 (>= 0.99.7.1), 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, ssh-server:i386 Provided by: openssh-server:i386 (1:7.2p2-4), openssh-server:i386 (1:7.2p2-4ubuntu2.1) 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
And, that’s all for now. You know now the packages belong to a package group. I will be soon here with another useful guide. If you find this guide useful, please share it on your social networks.
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Facebook | Twitter | Google Plus | LinkedIn | RSS feeds
Have a Good day!!