- List outdated processes:
- Interactively restart services:
- List outdated processes in [v]erbose or [q]uiet mode:
- Check if the [k]ernel is outdated:
- Check if the CPU microcode is outdated:
- List outdated processes in [b]atch mode:
- List outdated processed using a specific [c]onfiguration file:
needrestart -c path/to/config
- Display help:
needrestart checks which daemons need to be restarted after library upgrades.
needrestart [-(v|q)] [-n] [-c <cfg>] [-r <mode>] [-f <fe>] [-u <ui>] [-(b|p)] [-kl]
be more verbose
- -m <mode>
set level of technical details
set default answer to 'no'
- -c <cfg>
- -r <mode>
set restart mode
ATTENTION: If needrestart is configured to run in interactive mode but is run non-interactive (i.e. unattended-upgrades) it will fallback to list only mode.
enable batch mode
nagios plugin mode: makes output and exit codes nagios compatible
- -f <fe>
override debconf(7) frontend, sets the DEBIAN_FRONTEND environment variable to <fe>
- -t <seconds>
When checking running interpreter processes, allow process start times that are close to timestamps of files the interpreter uses, within this tolerance (default 2). The default value of 2 seconds is best for checks of Linux hosts, on which system limitations prevent more accurate measurements of process start times. Values higher than 0 should prevent false positives yet may in extreme cases cause false negatives; values higher than 2 should not be necessary.
- -u <ui>
use preferred UI package (-u ? shows available packages)
By using one of the following options only the specified checks are performed:
check for obsolete kernel
check for obsolete libraries
The following environment variables can be used to override the config file options. Command line parameters do always supersede them.
Change the configured restart mode (see also the -r parameter): (l)ist only, (i)nteractive or (a)utomatically
When used with apt-get(8) needrestart supports the following additional environment variables:
The debconf(7) frontend to use, can also set using the -f parameter.
If set to a non-empty value the apt-get(8) hook will not run needrestart after installing or updating packages.
Thomas Liske <firstname.lastname@example.org>
2013 - 2022 (C) Thomas Liske [http://fiasko-nw.net/~thomas/]
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.