DNF4-NEEDS-RESTARTING(8)

πŸ’… dnf4-needs-restarting(8) β€” the DNF needs_restarting plugin, explained by your favorite Unix bestie

okay so this is a section 8 manual page (system admin tools, iykyk) from dnf-plugins-core, and it's about a plugin called dnf4-needs-restarting. bestie, it literally checks for running processes that should be restarted. that's the whole vibe. ✨


🌸 NAME 🌸

dnf4-needs-restarting β€” the DNF needs_restarting plugin.

It checks for running processes that should be restarted. that's it, that's the job 🫢


πŸŽ€ SYNOPSIS πŸŽ€

dnf needs-restarting [-u] [-r] [-s]

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does is go rummaging through all your running processes and tries to spot the ones using files from packages that got updated after that process started. those are the ones it reports back to you. detective energy, honestly πŸ”

and like, real talk: in most cases a process should totally survive an update of its binary and the libraries it's using, no restart needed, it just keeps vibing. but there are specific cases where that does not apply. also separately β€” and this is the big one β€” processes often need to be restarted to reflect security updates. so yeah, pay attention πŸ’€

NOTE: πŸ’œ needs-restarting will try to guess the boot time using three different methods. three whole methods, she's thorough:
  • UnitsLoadStartTimestamp β€” a D-Bus property on /org/freedesktop/systemd1. works unless the system was not booted with systemd, such as in (most) containers.
  • st_mtime of /proc/1 β€” reflects the time the first process was run after booting. works for all known cases except machines without a RTC β€” those awake at the start of the epoch 😭
  • /proc/uptime β€” the seconds field of /proc/uptime subtracted from the current time. works for machines without RTC if the current time is reasonably correct. does not work on containers which share their kernel with the host β€” there, the host kernel uptime is what gets returned. rude but true.
WARNING: πŸ”₯ bestie please read this one Some systems are configured to read the RTC time in the local time zone. this mode cannot be fully supported. it will create various problems with time zone changes and daylight saving time adjustments. the RTC time is never updated β€” it relies on external facilities to maintain it. if at all possible, use RTC in UTC by calling timedatectl set-local-rtc 0. see man timedatectl for more information. no cap, just do it 🫢

✨ OPTIONS ✨

All general DNF options are accepted β€” see Options in dnf(8) for the details.

  • -u, --useronly β€” only consider processes belonging to the running user. just your stuff, nobody else's πŸ™ˆ
  • -r, --reboothint β€” only report whether a reboot is required (exit code 1) or not (exit code 0). simple yes/no, she's not elaborating πŸ’…
  • -s, --services β€” only list the affected systemd services that can be safely restarted. services that should not be restarted (such as dbus-broker) are excluded and reported as a warning on stderr. protecting the icons, periodt πŸ‘‘
  • --exclude-services β€” don't list stale processes that correspond to a systemd service. skip the service-y ones entirely.

πŸ“ CONFIGURATION πŸ“

the config lives here:

/etc/dnf/plugins/needs-restarting.d/

and individual files look like:

/etc/dnf/plugins/needs-restarting.d/pkgname.conf

so basically β€” packages can be added to needs-restarting via conf files in that config directory. config files need to have the .conf extension or they will be ignored. ignored!! (tragic, but that's the rule 😭)

more than one package is allowed in each file (one package per line), although it is advised to use one file for each package. lowkey cleaner that way, ngl.

Example:

echo "dwm" > /etc/dnf/plugins/needs-restarting.d/dwm.conf

🌈 AUTHOR 🌈

See AUTHORS in your Core DNF Plugins distribution.


2026, Red Hat, Licensed under GPLv2+.


and that's the whole page, bestie πŸŽ€ this was dnf-plugins-core version 4.7.0, dated Aug 10, 2026 β€” she's giving current, she's giving maintained, she's giving DNF4-NEEDS-RESTARTING(8). go restart your services, ily, bye πŸ’œβœ¨

πŸ“¦ where this page comes from