DNF groups simplify Fedora system setup by bundling related packages for specific workflows. Instead of installing compilers, version control tools, and build utilities individually, the Development Tools group handles everything in one command. Groups cover development environments, desktop configurations, web servers, container management, and specialized tasks like 3D printing or scientific computing.
This guide walks through listing available groups, viewing package details, installing mandatory and optional packages, upgrading group definitions after system updates, and removing groups you no longer need. You will also learn to handle hidden groups, view installed groups, resolve dependency conflicts, and troubleshoot common installation issues. All commands and outputs are verified on Fedora 43 with DNF5.
Preparation
Before using DNF group commands, ensure your system is properly configured. The following steps verify your Fedora version, administrative access, and package metadata are current.
Verify Fedora Version
DNF5 became the default package manager in Fedora 41, replacing DNF4. The group commands in this guide use DNF5 syntax. Verify your Fedora version:
cat /etc/os-release
The output displays your Fedora release information:
NAME="Fedora Linux" VERSION="43 (Workstation Edition)" ID=fedora VERSION_ID=43 PRETTY_NAME="Fedora Linux 43 (Workstation Edition)"
If you are running Fedora 40 or earlier, the group commands may differ slightly since those versions use DNF4.
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.2.17.0 dnf5 plugin API version 2.0 libdnf5 version 5.2.17.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, update your system to ensure you have the latest package definitions and metadata. The --refresh flag forces DNF to download fresh repository metadata rather than using cached data, ensuring you see the most current group definitions:
sudo dnf --refresh upgrade
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 All Available Groups
List all available groups on your system:
dnf group list
The output displays groups with their IDs, descriptive names, and installation status:
ID Name Installed c-development C Development Tools and Libraries no container-management Container Management no development-tools Development Tools no kde-desktop KDE no libreoffice LibreOffice no 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
Each group contains three categories of packages: mandatory (always installed), default (installed by default with the group), and optional (require the --with-optional flag). 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
On a fresh Fedora installation, this may return no results. After installing 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 database servers, web development stacks, and platform-specific tools:
ID Name Installed mail-server Mail Server no mysql MariaDB (MySQL) Database no news-server News Server no ocaml OCaml no perl Perl Development no perl-web Perl for Web no php PHP no platform-vmware VMware Platform Support no printing Printing Support no legacy-network-server Legacy Network Server no
Hidden groups cover database servers (MySQL/MariaDB), programming languages (OCaml, Perl, PHP), and platform-specific tools (VMware). These remain hidden because they serve specialized workflows rather than general desktop or development use.
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 name or ID:
dnf group info "Development Tools"
Fedora 43 displays the complete group information including all 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
: darcs
: dejagnu
: expect
: git-annex
: git-cola
: gitg
: meld
: quilt
: tig
: ... (38 optional packages total)
Understanding Package Tiers
DNF groups organize packages into three tiers that control installation behavior:
- 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.
Example: C Development Tools Package Breakdown
The C Development Tools and Libraries group demonstrates the three-tier structure with a comprehensive set of build tools. Inspect it to see the full package list:
dnf group info "C Development Tools and Libraries"
Fedora 43 reports the complete package breakdown:
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 13 mandatory packages provide the essential C/C++ toolchain including gcc, make, gdb, and autoconf. Default packages add debugging and profiling tools like valgrind, perf, and ltrace. The 14 optional packages include alternative build systems (cmake, python3-scons) and assemblers (nasm, yasm) for specialized development needs.
Installing a Group
Installing a group downloads and installs all mandatory and default packages in a single transaction. This saves time compared to installing packages individually and ensures you have a complete, coherent toolset for your intended workflow.
Install a Group with Default Packages
Use dnf group install followed by the group name in quotes:
sudo dnf group install "<group-name>"
Replace <group-name> with the group you want to install. For example, the Development Tools group installs Git, patch utilities, and version control tools:
sudo dnf group install "Development Tools"
DNF displays a transaction summary showing all packages that will be installed. Review this list and confirm with y to proceed.
Include Optional Packages
To install all packages in a group, including optional ones, add the --with-optional flag:
sudo dnf group install "<group-name>" --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.
Use Group IDs When Names Fail
Group names with spaces or special characters sometimes fail to parse correctly during installation. The dnf group list output shows both the ID (left column) and descriptive name (middle column). Group IDs never contain spaces, making them more reliable in scripts and interactive use.
For example, if “C Development Tools and Libraries” fails, use the group ID instead:
sudo dnf group install c-development
Similarly, for desktop environments like Xfce or KDE Plasma, using the group ID avoids parsing issues:
sudo dnf group install kde-desktop
Verify Installation
After installing a group, verify the key packages are available by checking their versions. For Development Tools, confirm Git is accessible:
git --version
Expected output confirms the installation:
git version 2.52.0
For the C Development Tools and Libraries group, verify GCC is available:
gcc --version | head -1
gcc (GCC) 15.2.1 20251211 (Red Hat 15.2.1-5)
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 ensures your installation matches the current definition, adding any new mandatory or default packages that have been introduced since you originally installed the group.
Upgrade to Latest Group Definition
Use dnf group upgrade to synchronize an installed group with its current definition:
sudo dnf group upgrade "<group-name>"
For example, after upgrading Fedora from version 42 to 43, 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 add new packages to installed groups. You must explicitly run dnf group upgrade to incorporate new group members.
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-name>"
For example, to remove the Development Tools group and all associated packages:
sudo dnf group remove "Development Tools"
DNF removes packages that were installed as part of the group and are not required by other installed software. Packages with dependencies from other applications remain on the system.
Remove Group Definition Only
To remove the group tracking without uninstalling its packages, use the --no-packages flag:
sudo dnf group remove "<group-name>" --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 to handle edge cases during group installation, such as dependency conflicts, unavailable packages, and installation customization. These flags work with install, upgrade, and remove subcommands.
Essential Group Flags
The following flags address common installation challenges:
--with-optional: Installs optional packages alongside mandatory and default packages. Use this when you need the complete feature set of a group.--allowerasing: Permits DNF to remove conflicting packages to resolve dependency issues. Use with caution, as this can remove packages you may need.--skip-unavailable: Continues installation even if some packages are unavailable. This is useful after Fedora upgrades when some packages may have been renamed or removed.--skip-broken: Skips packages with unresolvable dependencies and installs everything else. Use this when you want partial installation rather than complete failure.--no-packages: Operates on the group definition only without installing or removing packages. Useful for managing group state without affecting installed software.
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"
Fedora 43 reports:
Id : container-management
Name : Container Management
Description : Tools for managing Linux containers
Installed : no
Uservisible : yes
Repositories : fedora, updates
Default packages : podman
Optional packages : buildah
: flatpak
: flatpak-builder
: skopeo
: toolbox
The default installation includes only podman. To install a complete container workflow including buildah (image building), skopeo (image inspection), and toolbox (development containers), use:
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 upgrade to continue without failing:
sudo dnf group upgrade "Development Tools" --skip-unavailable
DNF reports which packages were skipped so you can investigate alternatives if needed.
Troubleshooting Common Issues
Group operations can fail for various reasons. The following sections cover the most common problems and their solutions with specific diagnostic steps.
Group Not Found
If DNF reports that a group does not exist, the group name may be incorrect or the group may be hidden.
Symptom:
No match for argument: "PHP Development" Error: No matching group found.
Diagnosis: Search for the actual group name or ID:
dnf group list --hidden | grep -i php
Expected output:
php PHP no
Solution: Use the correct group name or ID:
sudo dnf group install php
Dependency Conflicts
Dependency conflicts occur when a group requires a package version that conflicts with something already installed on your system.
Symptom:
Problem: package foo-1.2 conflicts with bar-2.0 provided by bar-2.0-1.fc43 - conflicting requests
Solution: Allow DNF to remove conflicting packages:
sudo dnf group install "<group-name>" --allowerasing
Review the transaction summary carefully before confirming. The
--allowerasingflag may remove packages you depend on. If critical packages would be removed, consider resolving the conflict manually instead.
Packages Unavailable
After Fedora version upgrades or when using third-party repositories, some packages in a group may no longer exist.
Symptom:
No match for argument: old-package-name Error: Unable to find a match.
Solution: Skip unavailable packages and install the rest:
sudo dnf group install "<group-name>" --skip-unavailable
For groups with broken dependencies on specific packages, combine flags:
sudo dnf group install "<group-name>" --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 --refresh makecache
Verify the refresh by listing groups again:
dnf group list
Quick Reference: DNF Group Commands
The following table summarizes all DNF5 group commands covered in this guide:
| Command | Purpose |
|---|---|
dnf group list | List all available groups |
dnf group list --installed | List installed groups only |
dnf group list --hidden | Include hidden groups in listing |
dnf group info "Group Name" | Display group details and package list |
sudo dnf group install "Group Name" | Install a group with mandatory and default packages |
sudo dnf group install "Group Name" --with-optional | Install a group including optional packages |
sudo dnf group upgrade "Group Name" | Upgrade group to latest definition |
sudo dnf group remove "Group Name" | Remove group and its packages |
sudo dnf group remove "Group Name" --no-packages | Remove group definition, keep 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
Conclusion
DNF group commands streamline Fedora package management by bundling related software into single-command installations. You can list groups with dnf group list, inspect package tiers before installation, include optional packages with --with-optional, and upgrade groups after Fedora releases to incorporate newly added packages. When group names cause parsing issues, substitute the group ID, use --allowerasing to resolve dependency conflicts, and apply --skip-unavailable during upgrades to handle renamed or retired packages.