↑ ↓ select, Enter open, Esc close

Find services using outdated libraries after updates

root@server
needrestart -r l

Inspects running processes for deleted or replaced libraries and compares the running kernel with the installed one. The mode -r l only lists and restarts nothing. Useful after security updates of OpenSSL or libc, to restart individual services instead of the whole server.

Note: needrestart is not preinstalled on Debian (apt install needrestart). Without -r l, it restarts services interactively or automatically depending on its configuration.

Also searched as

  • which services need to be restarted after update
  • restart after openssl update
  • is the old kernel still running

Related one-liners

All in Debian and APT

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.