Stop rpm or dnf from wasting your life on post-transaction script failures

Package Management (Apt/Dnf/Pacman Internals)

Stop rpm or dnf from wasting your life on post-transaction script failures

🧩 The Challenge

You know that feeling when you update a system, everything looks clean, but then dnf hangs indefinitely because some crusty post-install script is stuck in an infinite loop? It’s even worse when you’re working over a flaky SSH session and you have no idea if the database migration actually finished or if it’s just burning CPU cycles.

💡 The Fix

Use the rpm transaction macros to skip those specific buggy scripts during a manual update. This lets you force the package through so you can fix the mess yourself later without the package manager locking you out of the machine.

rpm -ivh --nopost --nopre package-name.rpm

⚙️ Why It Works

Setting these flags tells the RPM database to ignore the scriptlet headers entirely during the extraction phase. It’s a total hack, but it beats staring at a frozen cursor for thirty minutes while the package manager refuses to proceed.

🚀 Pro-Tip: Check the script content manually with rpm -q –scripts before you go rogue so you don’t break your dependency tree.

Linux Tips & Tricks | © ngelinux.com | 7/31/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted