DNF5 group commands on Fedora simplify setup work by bundling related packages for a specific role. Instead of installing compilers, version control tools, and build utilities one package at a time, the Development Tools group can pull in the standard toolset with one transaction. Groups also cover desktop environments, server roles, container tools, scientific software, and specialized workflows like 3D printing.
You can list visible and hidden groups, inspect package tiers before installing, include optional packages when you need them, upgrade group definitions after Fedora release changes, and remove groups cleanly when a role no longer belongs on the system. The examples use current Fedora DNF5 behavior, including Fedora 44 output where the exact shape matters, and call out older DNF4 aliases that now fail.
Preparation
Start by checking your Fedora release, administrative access, and package metadata. These checks prevent old syntax, missing privileges, or stale repository data from being mistaken for a group command problem.
Verify Fedora Version
Current Fedora releases use DNF5 through the familiar dnf command. Fedora 41 was the first release to make DNF5 the default, so old one-word aliases such as groupinstall are not reliable on supported Fedora systems. Check your release before comparing output:
cat /etc/os-release
The output displays your Fedora release information:
NAME="Fedora Linux" VERSION="44 (Workstation Edition)" ID=fedora VERSION_ID=44 PRETTY_NAME="Fedora Linux 44 (Workstation Edition)"
If you maintain an older Fedora system outside the current support window, verify DNF behavior locally before copying these examples. Fedora 40 and earlier used DNF4 by default, and several DNF4 group aliases no longer work with DNF5.
Ensure Administrative Privileges
Most DNF group operations require administrative rights. Verify your sudo access by running a simple package query:
sudo dnf --version
A successful command displays the DNF5 version information:
dnf5 version 5.4.2.0 dnf5 plugin API version 2.0 libdnf5 version 5.4.2.0
If prompted for a password, enter it to confirm your administrative access. If you receive a permission error, consult our guide on adding a user to sudoers on Fedora.
Update Your System
Before working with groups, refresh metadata and apply normal package updates so DNF sees current group definitions. The --refresh flag forces DNF to download fresh repository metadata rather than relying on cached data:
sudo dnf upgrade --refresh
For additional performance optimization, see our guide on increasing DNF speed on Fedora.
Listing Available Groups
DNF groups organize related software packages into named collections that simplify installation for specific tasks. Fedora provides groups for development environments, desktop configurations, server roles, and specialized workflows like scientific computing or 3D printing.
Display Visible Groups
List the visible groups available on your system:
dnf group list
The output displays groups with their IDs, descriptive names, and installation status. The Installed column is system-specific, so your results may differ from the example:
ID Name Installed c-development C Development Tools and Libraries no container-management Container Management yes development-tools Development Tools no kde-desktop KDE no libreoffice LibreOffice yes network-server Network Servers no python-science Python Science no rpm-development-tools RPM Development Tools no security-lab Security Lab no system-tools System Tools no
Group details commonly show mandatory, default, and optional packages. Some groups can also include conditional packages, which DNF installs only when their requirements are met. Understanding these tiers helps you control exactly what gets installed.
View Installed Groups
To see which groups are currently installed on your system, use the --installed flag:
dnf group list --installed
Minimal systems may return no results, while Fedora Workstation installs often show desktop, productivity, or container groups that were already present. After installing additional groups, they appear in this list with their installation status marked as yes.
Include Hidden Groups
Some groups are hidden from the default list because they serve specialized server or development workflows rather than general desktop use. The --hidden flag reveals these additional collections:
dnf group list --hidden
Hidden groups include language stacks, desktop variants, and critical-path collections that are not shown in the default list:
ID Name Installed perl Perl Development no php PHP no xfce-desktop Xfce no xfce-software-development Xfce Software Development no critical-path-kde Critical Path (KDE) no critical-path-xfce Critical Path (Xfce) no development-libs Development Libraries no gnome-software-development GNOME Software Development no java-development Java Development no
Hidden groups are still installable by ID. This matters for desktop articles as well as command work: the Xfce desktop group is xfce-desktop, not the display name Xfce.
Viewing Group Information
Before installing a group, inspect its contents to understand exactly what packages will be added to your system. DNF provides detailed information about each group, including its description, repository sources, and the complete package breakdown.
Display Group Details
Use dnf group info followed by the group ID. Display names can work for lookup, but IDs are the safer habit because the same ID also works for install, upgrade, and removal commands:
dnf group info development-tools
Relevant output includes the group ID, display name, repository source, and package tiers:
Id : development-tools
Name : Development Tools
Description : These tools include general development tools such as git and CVS.
Installed : no
Uservisible : yes
Repositories : fedora, updates
Mandatory packages : gettext
Default packages : diffstat
: doxygen
: git
: patch
: patchutils
: subversion
: systemtap
Optional packages : buildbot
: colordiff
: cvs
: cvs2cl
: cvsps
: darcs
: dejagnu
: expect
: git-annex
: git-cola
: gitg
: tig
Understanding Package Tiers
DNF groups organize packages into behavior tiers that control installation decisions:
- Mandatory packages: Always installed when you install the group. These are the core components required for the group’s purpose.
- Default packages: Installed by default when you install the group. These extend the mandatory set with commonly used tools.
- Optional packages: Only installed when you explicitly request them with
--with-optional. These provide specialized functionality that not all users need. - Conditional packages: Installed only when their dependency conditions are met. They do not appear in every group, but DNF5 supports them as part of group metadata.
Example: C Development Tools Package Breakdown
The C Development Tools and Libraries group demonstrates how mandatory, default, and optional package tiers appear in a development group. Inspect it to see the full package list:
dnf group info c-development
Relevant output shows why this group is larger than the general Development Tools group:
Id : c-development
Name : C Development Tools and Libraries
Description : These tools include core development tools such as automake, gcc and debuggers.
Installed : no
Uservisible : yes
Repositories : fedora, updates
Mandatory packages : autoconf
: automake
: binutils
: bison
: flex
: gcc
: gcc-c++
: gdb
: glibc-devel
: libtool
: make
: pkgconf
: strace
Default packages : byacc
: ccache
: cscope
: ctags
: elfutils
: indent
: ltrace
: perf
: valgrind
Optional packages : ElectricFence
: astyle
: cbmc
: check
: cmake
: coan
: cproto
: insight
: nasm
: python3-scons
: remake
: scorep
: yasm
: zzuf
The mandatory packages provide the essential C/C++ toolchain, including gcc, make, gdb, and autoconf. Default packages add debugging and profiling tools such as valgrind, perf, and ltrace. Optional packages include alternative build systems such as cmake and python3-scons, plus assemblers such as nasm and yasm.
Installing a Group
Installing a group downloads and installs its standard package set in a single transaction, including mandatory, default, and eligible conditional packages. Use the group ID from the left column of dnf group list for transaction commands, especially when the display name contains spaces.
Install a Group with Default Packages
Install a group with dnf group install followed by its ID:
sudo dnf group install <group-id>
The Development Tools group ID is development-tools. It installs Git, patch utilities, and version control tools:
sudo dnf group install development-tools
DNF displays a transaction summary showing the packages, dependencies, and download size before anything changes. Review that summary before confirming with y.
Include Optional Packages
To include optional packages from a group, add the --with-optional flag:
sudo dnf group install <group-id> --with-optional
For the Development Tools group, this adds specialized tools like buildbot, darcs, and the git-annex extension:
sudo dnf group install development-tools --with-optional
Optional packages extend the group’s functionality with tools that may not be essential for every user but can enhance your workflow. Check the group info output before installing to understand what optional packages provide.
If you only need one optional package, install that package directly instead of pulling the entire optional tier. For example, Darcs is listed as an optional Development Tools package on Fedora 44:
sudo dnf install darcs
Use --with-optional when you want the whole optional set, not just one tool.
Find Group IDs Before Transactions
DNF5 can resolve display names for information queries while rejecting those same display names during install or upgrade transactions. Removal commands can also miss a quoted display name by reporting that no groups need removal, so use the ID column for every transaction command.
Filter the group list when you know the display name but need the ID:
dnf group list "Development Tools"
The output identifies development-tools as the transaction-safe ID:
ID Name Installed development-tools Development Tools no
For desktop environments like Xfce or KDE Plasma, install the group ID rather than the display name:
sudo dnf group install kde-desktop
Verify Installation
After installing a group, verify a representative package or command from that group. For Development Tools, confirm Git is accessible:
git --version
Output starts with your installed Git version:
git version 2.54.0
For the C Development Tools and Libraries group, install the group by ID and then verify GCC:
sudo dnf group install c-development
Check that the compiler is on your path:
command -v gcc
/usr/bin/gcc
You can also confirm the group shows as installed:
dnf group list --installed
Upgrading a Group
Group definitions evolve over time as Fedora adds new packages or reorganizes existing ones. Upgrading a group synchronizes an installed group with the current definition, adding newly introduced mandatory or default packages when needed.
Upgrade to Latest Group Definition
Use dnf group upgrade to synchronize an installed group with its current definition:
sudo dnf group upgrade <group-id>
After a Fedora release upgrade, upgrade the Development Tools group to include any newly added packages:
sudo dnf group upgrade development-tools
If the group definition has not changed since installation, DNF reports that nothing needs to be done.
When to Upgrade Groups
Group upgrades are most useful in these scenarios:
- After Fedora version upgrades: New Fedora releases often update group definitions with newer or additional packages.
- Maintaining development environments: Ensure your build toolchain includes any newly recommended tools.
- Server deployments: Keep server role groups current with security-related package additions.
Regular system updates via sudo dnf upgrade update individual packages but do not necessarily add new packages to installed groups. Use dnf group upgrade when you want the installed group membership to track Fedora’s current group definition.
Removing a Group
When a software group is no longer needed, DNF can remove the group and its packages to free up disk space and reduce system complexity. You can choose to remove everything or keep individual packages while removing group-level management.
Remove a Group and Its Packages
To remove a group along with all its mandatory, default, and optional packages:
sudo dnf group remove <group-id>
For example, to remove the Development Tools group and all associated packages:
sudo dnf group remove development-tools
Review the removal transaction before confirming. DNF can change package reasons or remove packages that were installed for the group and are not required by other installed software.
Remove Group Definition Only
To remove the group tracking without uninstalling its packages, use the --no-packages flag:
sudo dnf group remove <group-id> --no-packages
This approach is useful when you want to retain specific packages from a group but no longer need group-level management. After removing the group definition, the packages become individually managed and will not be affected by future dnf group upgrade commands.
Customize Group Operations with Advanced Flags
DNF provides flags for edge cases such as optional package tiers, dependency conflicts, unavailable packages, and group-state changes. Check the subcommand before using a flag, because some options apply only to installation or upgrade operations.
Essential Group Flags
These flags address common group operation challenges:
--with-optional: Installs optional packages alongside the standard group package set. Use this withdnf group installwhen you need the complete feature set of a group.--allowerasing: Permits DNF to remove conflicting packages to resolve dependency issues during install or upgrade operations. Use with caution, as this can remove packages you may need.--skip-unavailable: Continues an install or upgrade when some packages are unavailable. This is useful after Fedora upgrades when packages have been renamed or removed.--skip-broken: Skips packages with unresolvable dependencies during installation and installs everything else. Use this only when a partial group install is acceptable.--no-packages: Operates on the group definition only without installing or removing packages. Use it when you need to change group state without changing the package set.
Example: Container Management Group
The Container Management group demonstrates how optional packages extend a group’s functionality. Inspect the group to see its composition:
dnf group info container-management
Relevant output shows Podman as the default package and several optional companion tools. The Installed and Repositories lines reflect a system where the group is already present:
Id : container-management
Name : Container Management
Description : Tools for managing Linux containers
Installed : yes
Uservisible : yes
Repositories : @System
Default packages : podman
Optional packages : buildah
: flatpak
: flatpak-builder
: skopeo
: toolbox
The default group includes Podman. On a system where the group is not installed, DNF shows Fedora repositories instead of @System and offers Podman in the transaction summary. To add optional companion tools such as Buildah for image building, Skopeo for image inspection, and Toolbox for development containers, install the group ID with --with-optional:
sudo dnf group install container-management --with-optional
For more information on container tools, see our guide on installing Docker on Fedora.
Handle Unavailable Packages During Upgrade
After upgrading Fedora, some packages in a group may have been renamed, merged, or removed. The --skip-unavailable flag allows the group upgrade to continue without failing on unavailable package names:
sudo dnf group upgrade development-tools --skip-unavailable
DNF reports which packages were skipped so you can investigate alternatives if needed.
Troubleshooting Common Issues
Most DNF group failures come from using a display name instead of an ID, relying on old DNF4 aliases, stale metadata, or forcing a transaction through conflicts without reading the package summary.
Quoted Group Name Fails During Install
DNF5 can show information for a quoted display name but still reject that name during an install or upgrade transaction. This commonly affects groups such as Development Tools, C Development Tools and Libraries, and Container Management.
Symptom:
Failed to resolve the transaction: No match for argument: Development Tools You can try to add to command line: --skip-unavailable to skip unavailable packages
Diagnosis: Search for the display name and copy the ID from the first column:
dnf group list "Development Tools"
Expected output:
ID Name Installed development-tools Development Tools no
Solution: Use the group ID for the transaction:
sudo dnf group install development-tools
Hidden Group Not Found
If the group does not appear in the default list, include hidden groups and filter the output with grep:
dnf group list --hidden | grep -i php
Expected output:
php PHP no
Install the group by its ID:
sudo dnf group install php
DNF4 Groupinstall Syntax Fails
DNF4-style aliases such as groupinstall, groupupdate, and groupremove are not valid DNF5 commands on current Fedora releases.
Symptom:
Unknown argument "groupinstall" for command "dnf5". Add "--help" for more information about the arguments. It could be a command provided by a plugin, try: dnf5 install 'dnf5-command(groupinstall)'
Do not install a plugin for this message. Replace the old alias with the DNF5 group subcommand:
sudo dnf group install development-tools
Dependency Conflicts
Dependency conflicts occur when a group needs a package version that conflicts with something already installed. Start by reading the proposed transaction and checking which packages DNF wants to remove or replace.
If the removals are acceptable, allow DNF to erase conflicting packages:
sudo dnf group install <group-id> --allowerasing
Review the transaction summary carefully before confirming. The
--allowerasingflag may remove packages you depend on. If critical packages would be removed, resolve the conflict manually instead.
Packages Unavailable
After Fedora version upgrades or when using third-party repositories, some packages in a group may be renamed, merged, or retired. Use --skip-unavailable only after checking that the skipped packages are not required for your workflow.
sudo dnf group install <group-id> --skip-unavailable
For groups with broken dependencies on specific packages, combine flags:
sudo dnf group install <group-id> --skip-unavailable --skip-broken
Stale Metadata
If group information appears outdated or groups are missing, your local metadata cache may be stale.
Solution: Force a metadata refresh:
sudo dnf makecache --refresh
Verify the refresh by listing groups again:
dnf group list
Quick Reference: DNF Group Commands
Keep the ID-based transaction pattern in mind when using these DNF5 group commands:
| Command | Purpose |
|---|---|
dnf group list | List visible groups with IDs, names, and installed state |
dnf group list --installed | List installed groups only |
dnf group list --hidden | Include hidden groups in the listing |
dnf group info <group-id> | Display group details and package tiers |
sudo dnf group install <group-id> | Install the standard package set for a group |
sudo dnf group install <group-id> --with-optional | Install a group including optional packages |
sudo dnf group upgrade <group-id> | Synchronize an installed group with the current definition |
sudo dnf group remove <group-id> | Remove group tracking and packages DNF can safely remove |
sudo dnf group remove <group-id> --no-packages | Remove group tracking while keeping installed packages |
Further Reading
For more DNF5 commands and Fedora package management, explore these related guides:
- DNF5 Install Command Examples on Fedora – Comprehensive package installation patterns
- DNF5 System Upgrade on Fedora – Upgrade between Fedora releases
- Install DNF Automatic on Fedora – Automate package updates
For the upstream option reference, see the official DNF5 group command documentation.
Conclusion
DNF group commands streamline Fedora package management by bundling related software into single-command installations. List groups with dnf group list, inspect package tiers with dnf group info, and use the group ID for install, upgrade, and remove transactions. That ID-first habit avoids display-name failures, while --with-optional, --allowerasing, and --skip-unavailable give you controlled ways to expand or repair group operations when the transaction summary supports it.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>