Site icon New Generation Enterprise Linux

Stop relying on file dates to know what installed that package

Package Management (Apt/Dnf/Pacman Internals)

Stop relying on file dates to know what installed that package

đŸ§© The Challenge

You’re digging through a server, something is broken, and you’re trying to figure out which package dropped that weird config file into /etc last Tuesday. Checking directory timestamps is a fool’s errand because of how many things touch them.

💡 The Fix

Use your package manager’s internal database to query the file origin directly. It’s way faster than guessing which update happened at 3 AM.

rpm -qf /etc/nginx/nginx.conf
dpkg -S /etc/nginx/nginx.conf

⚙ Why It Works

These commands look up the file paths inside the local metadata index maintained by the package manager, bypassing the filesystem state entirely. They cut through the noise and show you exactly which package claims ownership of that specific bit on your disk.

🚀 Pro-Tip: If you’re using dnf, use ‘dnf provides’ if you don’t know the exact path yet.

Linux Tips & Tricks | © ngelinux.com | 11/3/2026

0 0 votes
Article Rating
Exit mobile version