Linux

Install and manage software on CentOS Stream 10 with DNF: a beginner guide

Find packages, review repositories, install and verify nano, and understand updates and removal, with practical explanations of privileges, dependencies, and DNF errors.

Updated: 03/11/2026

After installing CentOS Stream 10 in a virtual machine, where should you get software? This guide uses DNF to find a package, inspect its source, install a small text editor, and verify that it works. You will also distinguish checking for updates from applying them, and learn what to review before removing a package.

Use a conventional CentOS Stream 10 installation with mutable system packages in a practice environment. Do not apply these steps automatically to Ubuntu, a work computer, or an image managed through a different update mechanism. Commands are reference examples, not a transcript from your computer. Available versions, sizes, and dependencies depend on your repositories and system state.

Packages, repositories, and dependencies

A package groups program files with information that lets the system manage them; this distribution family commonly uses RPM packages. A repository provides a catalog and source for packages and updates. Dependencies are components another package needs, which explains why installing one program may propose several additional packages.

DNF resolves these relationships and presents a transaction: a proposed group of package changes. You still need to review its source and effects. Starting with the distribution's trusted repositories gives you a clearer maintenance path than running an unknown installation script with administrator privileges.

Find a package and source, review the proposed transaction, then open and verify the tool
Original Mira4Tech educational diagram explaining the idea; not a screenshot or an execution result.

1. Prepare the practice machine and identify the system

Open Terminal inside the CentOS virtual machine, not PowerShell on the Windows host. Prepare Internet connectivity and an account authorized to use sudo. If your virtualization application supports snapshots, take one before experimenting. A snapshot is useful for a lab exercise but does not replace an independent backup of important files.

Run these lines separately, without typing a terminal prompt symbol:

cat /etc/os-release
dnf --version
dnf repolist --enabled

Confirm that the operating system identifies as CentOS Stream 10, that DNF is available, and that enabled repositories fit the installation. Repository commands may first download catalog metadata. Let them complete. If connectivity fails, resolve it before switching to an arbitrary website for a package download.

CentOS Stream 10 with GNOME 47 as documented by Paowee in December 2024
Real desktop screenshot, not a demonstration of these commands or a claim about the latest build. Paowee, 22 December 2024, source, GPL-2.0-or-later. Original image unmodified; see attribution and software sources.

2. Search for nano and inspect its details

Use nano, a small terminal text editor, for a focused exercise rather than installing a large software collection. Search first, then request information for the exact package name:

dnf search nano
dnf info nano

A search can return related names. Read the name and description rather than accepting the first match. In the information view, inspect the repository, architecture, and version. Installed and available package entries may appear separately. A version differing from an old tutorial is not itself a problem. If nano is unavailable, review repository availability before adding third-party sources.

These are information-gathering steps. You do not need to prefix every Linux command with sudo. Reserve elevated privileges for the operation that needs them so you can identify where the exercise actually changes the system.

Read package information, perform an authorized installation, and verify the installed package
Original Mira4Tech educational diagram explaining the idea; not a screenshot or an execution result.

3. Review the proposed installation

sudo dnf install nano

sudo may ask for your account password; characters or asterisks normally do not appear while you type it. After dependency resolution, read every proposed package action and the download and disk-space requirements. Confirm only if they match your goal. If unexpected removals or replacements appear, answer n and investigate. This exercise deliberately leaves out -y so you can review the confirmation.

A distribution repository may request permission to import a signing key. Check its details against the official repository information before accepting. Do not disable signature checking or HTTPS verification to work around a failure. If nano is already installed, DNF may report that no transaction is needed; that is different from an installation error.

4. Check installation and save your own practice file

rpm -q nano
nano --version
nano ~/mira-dnf-practice.txt

The first command queries the local package database; the second runs the tool to report its version. In the editor, type a practice sentence, press Ctrl+O, confirm the filename with Enter, and exit with Ctrl+X. Choose a different name if that file already contains something you want to keep. Open the file again and check the sentence. This verifies editing and saving rather than simply assuming a finished download means the tool works.

The ~ symbol identifies your current user's home directory. Run this editor without sudo because you are editing your own document. If the save location is unclear, inspect the path before confirming it instead of retrying with higher privileges.

5. Separate checking for updates from installing them

dnf check-update
echo $?

Run the second line immediately after the first to inspect its exit code. With traditional DNF, 100 means updates are available, 0 means no available updates were reported, and 1 indicates an error. Code 100 alone is not a failure. The check does not install updates, and dependency constraints can affect what a later upgrade can actually apply.

For nano specifically, when an update is available, use:

sudo dnf upgrade nano

Read this transaction too; it may need dependency updates. Updating one application does not make the entire operating system current. Running sudo dnf upgrade considers a wider system update. Plan that operation with a suitable backup and time for a restart if required; do not append it automatically to a short experiment on an important machine.

6. Inspect history and decide whether to remove the package

dnf history

Read the transaction identifier, time, and action. Use dnf history info followed by an actual identifier for details; dnf history info 12 is only an example if transaction 12 exists on your machine. If history access is restricted, use sudo for that read operation with an authorized account, rather than changing the package database's file permissions.

If you installed the package only for this exercise and no longer need nano, request removal:

sudo dnf remove nano

Review the entire removal list before accepting. DNF may also propose removing dependencies it considers no longer needed. Cancel if important or unfamiliar components appear. Afterwards, query rpm -q nano; an absent-package message is expected after successful removal. Your home-directory text file is separate and may remain. Package history is not a guaranteed rollback mechanism: availability of old versions and dependencies can prevent reversal.

Troubleshoot the specific message

Questions before moving beyond the exercise

Should I download an RPM file manually?

Start with trusted repositories. An individual download adds responsibility for verifying origin, compatibility, and updates. It is not an automatic remedy for every missing search result.

Does sudo make a command safe?

No. It gives a command greater authority to change the system. Understand the command and transaction, especially for removal and upgrades. Avoid pasting an unknown sequence that asks for administrator access.

Can I reuse these commands on every distribution?

This guide targets CentOS Stream 10 with traditional DNF. DNF5 or other distribution interfaces may differ. Identify the operating system and local tool version before transferring instructions between environments.

Sources and learning path

The Red Hat documents below describe related DNF workflows. Referencing them does not mean CentOS requires a RHEL subscription, or that repository names are identical on both systems.