Restarting services after debian server upgrade

after debian server upgrade the systems said I need to restart some services as they are using old libraries. I did not restart it it… how to find out now which services need to be restart now?

To find out which services need to be restarted because they are using outdated libraries after a Debian upgrade, you can use the needrestart utility. This tool scans for services and processes using old libraries and suggests which ones need a restart.

If you don’t have needrestart installed yet, you can install it with:

sudo apt update
sudo apt install needrestart

After installation, run:

sudo needrestart

This will display a list of services or processes that need to be restarted due to using old libraries. It will also give you options to restart them directly if needed.

1 Like

1.Use needrestart Tool (Recommended)
Debian provides a tool called needrestart to check and restart affected services.

Install needrestart (if not installed)

sudo apt update && sudo apt install needrestart -y

Run needrestart
sudo needrestart
It will list all services that require a restart.
You can choose to restart them individually or all at once.

2.Manually Check Using lsof
If you don’t want to install extra tools, you can manually check using lsof:
sudo lsof | grep ‘DEL.*lib’
This lists processes using deleted (old) libraries.
To find affected services:
sudo lsof | grep ‘DEL.*lib’ | awk ‘{print $1}’ | sort -u
Restart each service manually using:
sudo systemctl restart

For professional Linux server management and troubleshooting, visit
dvsitservices