How To Install needrestart on CentOS 8
Introduction
In this tutorial we learn how to install needrestart
on CentOS 8.
What is needrestart
needrestart checks which daemons need to be restarted after library upgrades. It is inspired by checkrestart from the debian-goodies package.
We can use yum
or dnf
to install needrestart
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install needrestart.
Install needrestart on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install needrestart
using dnf
by running the following command:
sudo dnf -y install needrestart
Install needrestart on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install needrestart
using yum
by running the following command:
sudo yum -y install needrestart
How To Uninstall needrestart on CentOS 8
To uninstall only the needrestart
package we can use the following command:
sudo dnf remove needrestart
needrestart Package Contents on CentOS 8
/etc/default/intel-microcode
/etc/dnf/plugins/needrestart.conf
/etc/needrestart
/etc/needrestart/conf.d
/etc/needrestart/conf.d/README.needrestart
/etc/needrestart/hook.d
/etc/needrestart/hook.d/10-dpkg
/etc/needrestart/hook.d/30-pacman
/etc/needrestart/hook.d/90-none
/etc/needrestart/iucode.sh
/etc/needrestart/needrestart.conf
/etc/needrestart/notify.conf
/etc/needrestart/notify.d
/etc/needrestart/notify.d/200-write
/etc/needrestart/notify.d/400-notify-send
/etc/needrestart/notify.d/600-mail
/etc/needrestart/notify.d/README.needrestart
/etc/needrestart/restart.d
/etc/needrestart/restart.d/README.needrestart
/etc/needrestart/restart.d/auditd.service
/etc/needrestart/restart.d/dbus.service
/etc/needrestart/restart.d/systemd-manager
/etc/needrestart/restart.d/sysv-init
/usr/lib/needrestart
/usr/lib/needrestart/iucode-scan-versions
/usr/lib/needrestart/notify.d.sh
/usr/lib/needrestart/vmlinuz-get-version
/usr/lib/python3.6/site-packages
/usr/lib/python3.6/site-packages/dnf-plugins
/usr/lib/python3.6/site-packages/dnf-plugins/__pycache__
/usr/lib/python3.6/site-packages/dnf-plugins/__pycache__/needrestart.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/dnf-plugins/__pycache__/needrestart.cpython-36.pyc
/usr/lib/python3.6/site-packages/dnf-plugins/needrestart.py
/usr/sbin/needrestart
/usr/share/doc/needrestart
/usr/share/doc/needrestart/ChangeLog
/usr/share/doc/needrestart/NEWS
/usr/share/doc/needrestart/README.Cont.md
/usr/share/doc/needrestart/README.Interp.md
/usr/share/doc/needrestart/README.batch.md
/usr/share/doc/needrestart/README.md
/usr/share/doc/needrestart/README.nagios.md
/usr/share/doc/needrestart/README.uCode.md
/usr/share/licenses/needrestart
/usr/share/licenses/needrestart/COPYING
/usr/share/locale/cs/LC_MESSAGES/needrestart-notify.mo
/usr/share/locale/cs/LC_MESSAGES/needrestart.mo
/usr/share/locale/de/LC_MESSAGES/needrestart-notify.mo
/usr/share/locale/de/LC_MESSAGES/needrestart.mo
/usr/share/locale/ru/LC_MESSAGES/needrestart-notify.mo
/usr/share/locale/ru/LC_MESSAGES/needrestart.mo
/usr/share/man/man1/needrestart.1.gz
/usr/share/needrestart
/usr/share/needrestart/needrestart.templates
/usr/share/perl5/vendor_perl/NeedRestart
/usr/share/perl5/vendor_perl/NeedRestart.pm
/usr/share/perl5/vendor_perl/NeedRestart/CONT
/usr/share/perl5/vendor_perl/NeedRestart/CONT.pm
/usr/share/perl5/vendor_perl/NeedRestart/CONT/LXC.pm
/usr/share/perl5/vendor_perl/NeedRestart/CONT/docker.pm
/usr/share/perl5/vendor_perl/NeedRestart/CONT/machined.pm
/usr/share/perl5/vendor_perl/NeedRestart/Interp
/usr/share/perl5/vendor_perl/NeedRestart/Interp.pm
/usr/share/perl5/vendor_perl/NeedRestart/Interp/Java.pm
/usr/share/perl5/vendor_perl/NeedRestart/Interp/Perl.pm
/usr/share/perl5/vendor_perl/NeedRestart/Interp/Python.pm
/usr/share/perl5/vendor_perl/NeedRestart/Interp/Ruby.pm
/usr/share/perl5/vendor_perl/NeedRestart/Kernel
/usr/share/perl5/vendor_perl/NeedRestart/Kernel.pm
/usr/share/perl5/vendor_perl/NeedRestart/Kernel/Linux.pm
/usr/share/perl5/vendor_perl/NeedRestart/Kernel/kFreeBSD.pm
/usr/share/perl5/vendor_perl/NeedRestart/Strings.pm
/usr/share/perl5/vendor_perl/NeedRestart/UI
/usr/share/perl5/vendor_perl/NeedRestart/UI.pm
/usr/share/perl5/vendor_perl/NeedRestart/UI/Debconf.pm
/usr/share/perl5/vendor_perl/NeedRestart/UI/stdio.pm
/usr/share/perl5/vendor_perl/NeedRestart/Utils.pm
/usr/share/perl5/vendor_perl/NeedRestart/uCode
/usr/share/perl5/vendor_perl/NeedRestart/uCode.pm
/usr/share/perl5/vendor_perl/NeedRestart/uCode/AMD.pm
/usr/share/perl5/vendor_perl/NeedRestart/uCode/Intel.pm
/usr/share/polkit-1
/usr/share/polkit-1/actions
/usr/share/polkit-1/actions/net.fiasko-nw.needrestart.policy
References
Summary
In this tutorial we learn how to install needrestart
on CentOS 8 using yum and dnf.