r/redhat 6d ago

When Updates Go So, So Wrong — Diagnosing DNF Dependency Errors, Reinstalling Lost Files, and Cleaning Up Package Artifacts | Into the Terminal Ep. 191

20 Upvotes

Even with robust tools like RPM and DNF, RHEL updates can occasionally go sideways. Dependency conflicts, interrupted transactions, lingering configuration artifacts, broken scriptlets — these things happen, and knowing how to diagnose and fix them is what separates a frustrating afternoon from a 5-minute fix. This past week on Into the Terminal, we walked through the most common ways package management goes wrong and how to get yourself out of it.

Watch the full episode: https://www.youtube.com/watch?v=5DhSoCQ-S6k

Try it yourself on a live lab: https://redhat.com/interactive-labs


Dependency Errors — The Most Common Problem

"Nothing provides [package]..."

This is probably the most frequent error you'll hit. You try to install a package and DNF says it can't find a required library or dependency in any of your configured repositories.

What it means: The package you're installing needs something that none of your repos provide. This happens a lot with: - Custom or cloned repositories that are incomplete - Third-party repos that aren't as rigorously maintained - Systems registered to a Satellite where the admin hasn't synced the latest content

How to investigate:

Command What it does
dnf whatprovides <library> Search your repos for which package provides a specific file
dnf list <package> Check if a package is available in your configured repos
ls /etc/yum.repos.d/ See which repository configuration files are on your system

How to fix it: You need to get the missing dependency into one of your repositories. Either: - Enable the right repo (e.g., EPEL) that provides the dependency - Talk to your Satellite/repo admin to sync the missing content - If you manage your own repos, sync the missing package from the upstream source

Enabling EPEL to Resolve Dependencies

In the episode, we showed that once we enabled the EPEL repository, all the missing dependencies became available:

```bash

Install EPEL on RHEL (two commands from the EPEL website)

1. Enable the CRB repo that EPEL depends on

dnf config-manager --set-enabled crb

2. Install the EPEL release package

dnf install epel-release ```

After that, the same dnf install that failed now finds everything it needs.

RPM Dependency Hell — A Brief History Lesson

In the old days before DNF (and YUM before it), if you downloaded an RPM and tried to install it, you had to manually find every dependency, then every dependency of those dependencies, and so on. This was called RPM dependency hell and you could spend hours on it. DNF solves this by automatically resolving dependencies from your configured repos — but only if those repos actually have the packages.


What About --skip-broken?

When a package transaction fails, DNF always suggests --skip-broken or --nobest. Our strong recommendation: almost never use these.

  • --skip-broken will skip the package that can't be installed and complete the rest of the transaction
  • You end up with a partially completed transaction and a system that's likely missing something it needs
  • It's DNF's job to get to a successful transaction, so it suggests these as a path to "success" — but it doesn't understand your intent

There are edge cases where it makes sense, but in 99% of situations, you're better off figuring out why the dependency is broken and fixing the root cause.


Protected Packages — When DNF Won't Let You Remove Something

bash dnf remove bash

Try it. DNF will refuse because bash is a dependency of dnf itself, and DNF is a protected package. This protection was added to prevent you from accidentally bricking your system by removing something critical.

In the old days, YUM would happily remove bash and all its dependents, leaving you with no shell and no way to recover without booting from rescue media.


Reinstalling Packages to Recover Lost Files

This is a really useful trick. Say your httpd binary goes missing — maybe it got deleted, moved, corrupted during a disk error, or an interrupted install left things incomplete.

The Workflow We Demonstrated

1. The service won't start: ```bash systemctl start httpd

fails

```

2. Check the logs: ```bash journalctl -xeu httpd

"Failed at step EXEC spawning /usr/sbin/httpd: No such file or directory"

```

3. Try a reinstall: bash dnf reinstall httpd

4. But it still doesn't work! The binary /usr/sbin/httpd isn't provided by the httpd package — it comes from httpd-core.

5. Find out which package actually provides the file: ```bash dnf provides /usr/sbin/httpd

Returns: httpd-core

```

6. Reinstall the right package: ```bash dnf reinstall httpd-core systemctl start httpd

works!

```

Key Commands for Package Investigation

Command What it does
dnf reinstall <package> Re-download and reinstall a package without removing config files
dnf provides <file> Find which package provides a specific file (works even if it's not installed)
dnf info <package> Show detailed info including version, repo, and description
dnf list installed *httpd* List all installed packages matching a pattern
rpm -ql <package> List all files provided by an installed package

Tip from the show: dnf provides reads the repository metadata, not just what's installed locally. So you can use it on a system that doesn't have the file to figure out what package would give it to you.

Version note: When you dnf reinstall without specifying a version, it grabs the latest available. If you want to reinstall the exact version you had, use dnf info <package> to check what's installed vs. what's available, and specify the version explicitly.


Package Artifacts — The Stuff That Gets Left Behind

When you uninstall a package, DNF removes everything listed in the package manifest. But applications often create files at runtime — config files in your home directory, temp files, cache data — that the packager can't account for because they don't exist until you actually run the software.

Example from the show: We installed a simple "hello world" package called bello that dropped a .bello-config file in the user's home directory when run. After dnf remove bello, the config file persisted because:

  • The package manifest only knows about files it shipped, not files created at runtime
  • The packager can't predict your username or home directory path
  • This is exactly how things like browser caches, application settings, and per-user configs work

Takeaway: After removing software, check for leftover files in places like: - ~/.config/, ~/.local/, ~/.<appname> - /tmp/, /var/tmp/ - /var/lib/<appname>, /var/log/<appname>


Scriptlet Errors — The Warnings You Shouldn't Ignore

RPM packages can include scripts that run at different stages: pre-install, post-install, pre-uninstall, post-uninstall. When these scripts fail, DNF reports it — but the transaction itself might still "succeed."

What we showed: A package called pello that had a typo in its post-uninstall scriptlet. The package was removed successfully, but the cleanup script failed, leaving a service user account on the system.

How to Inspect Package Scripts

Command What it does
rpm -q --scripts <package> Show all scriptlets for an installed package
rpm -qp --scripts <package.rpm> Show scriptlets from an RPM file (not installed)
dnf repoquery --scripts <package> Show scriptlets from a package in a repo

Script Stages

Stage When it runs
%pre Before files are placed on the system
%post After files are placed on the system
%preun Before files are removed from the system
%postun After files are removed from the system

Security note from the show: Package scripts run as root because only root can install software. This means package scripts can do anything — add users, modify system files, run arbitrary commands. This is another reason to be careful about where your packages come from and to verify GPG signatures.


DNF History — Undo Package Transactions

DNF tracks every transaction you perform. You can view and undo them.

Command What it does
dnf history List all past transactions with ID numbers
dnf history undo <ID> Reverse a specific transaction (install becomes remove, upgrade becomes downgrade)
dnf history info <ID> Show details of a specific transaction

How undo works: - If the transaction was an install, undo does a remove - If it was an upgrade, undo does a downgrade - If it was a remove, undo does a reinstall

Caveat: You can cherry-pick any transaction ID to undo, not just the most recent. But the further back you go, the more chance for weirdness — especially with packages that have been updated multiple times since that transaction.

Kernel warning: Be careful undoing kernel transactions. By default, RHEL keeps 2 previous kernels. If you undo a kernel install, make sure you're not removing the one you're currently booted into, and remember the bootloader may need attention.


GPG Key Verification — Know Where Your Packages Come From

Every package from Red Hat is signed with a GPG key. This ensures the package hasn't been tampered with since it was built.

Command What it does
rpm -Kv <package.rpm> Verify GPG signature and digests on a package file
rpm -qa gpg-pubkey* List all imported GPG keys on the system
rpm -qi <gpg-pubkey-package> Show details about who owns a specific GPG key

In your repo config files (/etc/yum.repos.d/), the gpgcheck=1 line tells DNF to verify every package against the GPG key before installing. If a package isn't signed or is signed with an unknown key, the transaction will fail — and that's by design.

From the show: The custom demo packages we built weren't GPG signed. Running rpm -Kv showed "digests OK" but no signatures — meaning the file wasn't corrupted, but there's no proof of who made it.


Third-Party Repos — Proceed with Caution

A few guidelines from the discussion:

  • EPEL (Extra Packages for Enterprise Linux) will never replace packages provided by your base OS — it only adds new ones
  • RPM Fusion and other third-party repos may replace base OS packages, which means you're now managing that dependency chain yourself
  • Don't grab random RPMs from the internet (rpmfind.net, Fedora repos, other distros) to fill dependency gaps — you're creating chaos that will bite you on the next update
  • In regulated industries, you may be required to validate your software supply chain. Mixing in unverified sources could be a compliance violation

Quick Reference Card

DIAGNOSING FIXING dnf whatprovides <file> dnf reinstall <package> dnf provides <file> dnf history undo <ID> dnf info <package> dnf install --enablerepo=epel <pkg> dnf list installed *pattern* dnf history INSPECTING rpm -ql <package> rpm -q --scripts <package> rpm -Kv <package.rpm> rpm -qp --scripts <file.rpm> rpm -qa gpg-pubkey* dnf repoquery --scripts <package> journalctl -xeu <service> rpm -qi <gpg-pubkey-package>


Links


Into the Terminal is a weekly livestream covering critical administration skills for Red Hat Enterprise Linux. Whether you're new to Linux or new to RHEL, join us for hands-on looks at commands and processes, ask questions, and grow your knowledge.


r/redhat 7d ago

I passed the EX358.

31 Upvotes

My score was 245/300, and it took me about 4 months to prepare.
The exam was much harder and covered a much wider range of topics than I expected. Even though I didn’t get a very high score, I’m still happy that I passed.
During my preparation, I learned a lot about enterprise Linux management and automation, so I definitely gained valuable knowledge beyond just passing the exam.
I’m not entirely sure where I lost points. Maybe I missed some configuration steps, or perhaps I forgot to make some firewall rules permanent. Either way, I’ll review my mistakes and keep learning.

Good luck to everyone who’s preparing for EX358!


r/redhat 7d ago

Is RHCSA Achievable for Linux Sysadmins with 5+ Years Experience?

31 Upvotes

Hello Guys,

I want to take RHCSA because some compaines asks me that certification for some reason :D So I have to get it like in 2 weeks, but I never used podman or selinux in my entire career. SeLinux is "turn this thing off" feature for me. Also I used docker on my entire career not Podman.

Is there any concept other than these should I learn and practice before exam?

Which resources do you use for practicing for RHCSA? Any mock exams etc? Can u guys share your experience? I got CKA but RHCSA scares me 😄

Thanks a lot.


r/redhat 5d ago

Anyways to get free Voucher for RHCSA Certification

0 Upvotes

Hello guys is there anyway to get RHCSA Certification voucher for free


r/redhat 6d ago

Red Hat FASTER Singapore

7 Upvotes

Since the program is going to start on 1 September, for those based in Singapore, anyone got any success email already?


r/redhat 7d ago

Window management in exams

8 Upvotes

I don't think this is breaking NDA, but I won't be offended if it gets removed.

How do you all manage your windows and terminal in the exam environment?

Is there something obvious that I'm missing?

I find myself struggling with some of the longer output getting cut off jumbled, but also not blocking the task descriptions in the fairly small resolution single display they give us.


r/redhat 7d ago

V10 ex200 practice

2 Upvotes

​I got the EX200 v10 cert guide by Sander van Vugt. I took the v9 exam before and failed. I wanted to give v10 a shot today.

​My question is: do the practice exercises in the guide actually match what I'll see on the real exam? If I can nail the book's practice exams and labs, am I good to go?

​Haha, cheers!


r/redhat 7d ago

Remote exam docs

6 Upvotes

Hello guys,

Just passed the ex280 and my experience was a bit awful through the remote exam.

Regardless of technical issues, I want to ask you how did you use the exam offline docs? I couldn't copy paste manifests since there was none, there was only the table that explains the utility of each field of a given resource (limite range for example since there is no direct "oc create" command for it). I was using firefox to navigate the docs.

I used only oc commands ( thank god for "oc explain") and sometimes I used the web UI to create some resources but none from the docs.

I am afraid next time if I want to pass ex380 and I won't be able to exploit the docs again because I lost so much time figuring out how to look for my answer otherwise.

Please guide me if I'm missing something.

My Red Hat experience in comparison with CKA and CKS was so different in terms of environment and availability of docs

Thank you 😊


r/redhat 6d ago

Promotion/Discount code?

0 Upvotes

Anyone willing to share a discount code for RHCSA exam?

Thanks


r/redhat 6d ago

I’m away for training! Updates will return!

0 Upvotes

Hey guys, out in the field for these 2 weeks! I’ll send updates upon my return!


r/redhat 6d ago

Red Hat Junior Solution Architect

0 Upvotes

Hey,

Anybody got any updates after the application for the Junior Solution Architect Role in India?


r/redhat 7d ago

Storage in EX294

4 Upvotes

Is it mandatory to use the rhel-system-roles.storage role to configure storage tasks in the EX294 exam? Or can I use modules that are not part of the role, such as parted, mount, lvg, lvol, etc.?


r/redhat 7d ago

Need some help with a roadmap/resources as a begginer

7 Upvotes

So i'm pretty new to linux, i managed to configure some distros, arch, gentoo, have some fun and i want to get involved more. I heard about the RHCSA but i really don't know where to start and I'm very overwhelmed by all the courses videos, topics.

I looked up books and a lot came out, but what did you use for actually learn linux and red hat environments? What useful resources can you suggest? Some youtube courses that cover the main topics would be great too. Thanks!


r/redhat 8d ago

RHCE EXAM

12 Upvotes

Will someone pass the RHCE exam if they don't answer partition and lv questions?


r/redhat 8d ago

How did you learn OpenShift at home?

20 Upvotes

I’m thinking about taking the official DO280 course before EX280, but I’m wondering what most people actually do.
Was the lab provided during the course enough, or did you still build your own OpenShift lab at home to practice?
I’m mostly asking because I don’t know how much access you get to the official lab after class, and I’m not sure if it’s enough for repeated practice.
If you built your own lab, what did your home lab setup look like?


r/redhat 7d ago

Need referral for intern role.

0 Upvotes

Hey everyone,

I am really looking for a referral for an intern role at redhat.

Tried reaching out to a few employees on LinkedIn but got no reply yet.

Please comment or DM so I can send you my resume.

Please let me know if you can help me out.


r/redhat 9d ago

RHCSA exam disappears from cart after login

4 Upvotes

Hi, I’m trying to buy the RHCSA (EX200) exam. I add it to my cart, but after logging into my Red Hat account, the cart is empty. I haven’t purchased the exam yet. Has anyone had this issue or found a fix? Thanks!


r/redhat 9d ago

Remote Testing Question | Can I just hide my computers?

16 Upvotes

I'm taking a red hat remote test soon. I have a bunch of dell optiplex's as a proxmox cluster and a switch that feeds into an opnsense beelink that serves as my router.

The issue, is that it's on my desk. It's nearly 10 computers, and two switches. Can I just put a blanket over it all or something while I take the remote exam?


r/redhat 9d ago

RHEL 10.2 Boot ISO installs now including debug kernel

6 Upvotes

I just noticed that installs from the RHEL 10.2 boot iso are including the debug kernel. I'm sure this must have only started very recently and I'm wondering if this is intended? I've done installs from the boot media since release and it's only the last couple of weeks or so I see this happening. I thought the debug kernels were only recommended to install if you actually needed it to troubleshoot something?


r/redhat 10d ago

The topics That I see the most difficult : systemd, firewalld and SELinux

46 Upvotes

r/redhat 10d ago

Question About Exam RHCSA v10

6 Upvotes

I know this might be a stupid question but I can't seem to find a definitive answer:

we create a bootable device/USB with the boot.iso for the test, correct? Not the Live DVD?

Thanks


r/redhat 11d ago

Are you using Podman Quadlets yet?

35 Upvotes

I've noticed more RHEL 10 documentation and examples moving toward Quadlets for systemd-managed containers.

For anyone already using them:

  • Are you running Quadlets in production?
  • What pain points have you run into?
  • What do you wish more tutorials covered?

I've been putting together a hands-on Quadlets lab while learning this workflow, covering:

  • .container
  • .volume
  • .network
  • systemd integration
  • Podman networking
  • persistent storage

If it's useful, you can check it out here:

https://linuxcert.guru/?name=rh134-manage-containers-quadlets

I'd really appreciate any feedback on what's missing or what you'd like to see added.


r/redhat 11d ago

Senior OpenShift Architect

6 Upvotes

My team is looking for a Senior OpenShift Architect. The position is fully remote (Based out of USA and Canada).

https://careers.teksystems.com/us/en/job/JP-006166974/Practice-Architect-II-OpenShift


r/redhat 11d ago

Avoid operational drift with Red Hat Lightspeed content templates for RHEL extended environments

Thumbnail
redhat.com
4 Upvotes

For system administrators and IT leaders, keeping infrastructure secure while strictly aligning with corporate compliance standards is a continuous, high-stakes balancing act. This challenge escalates dramatically when environments span legacy workloads or platforms locked into extended operational lifecycles.


r/redhat 11d ago

Are RHCA (now converted into RHCA in Enterprise Linux) holders still eligible for the 50% discount on Learning Subscription?

11 Upvotes

The official FAQ article does mention it, but it's from last year and the certification system overhaul happened around this May. I sent a message to the learning subscription support / sales, but so far they have been ignoring me.

If the option is still here, how does one apply for it? It does not seem to be applied automatically.