Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandoaleman/c3191ed46c977f0a3fcfbdac319183fc to your computer and use it in GitHub Desktop.
Save fernandoaleman/c3191ed46c977f0a3fcfbdac319183fc to your computer and use it in GitHub Desktop.
How to disable Ubuntu 22.04 "Daemons using outdated libraries" popup

Problem

When using apt to install or update packaged, Ubuntu 22.04 now pops up a Daemons using outdated libraries box.

lAFlE

Solution

To disable this pop up box, edit

vim /etc/needrestart/needrestart.conf

change

#$nrconf{restart} = 'i';

to

$nrconf{restart} = 'a'; # restart the services automatically
@AvastON
Copy link

AvastON commented Feb 22, 2024

Simple solution without vim

sudo sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf

or

sudo echo "\$nrconf{restart} = 'a'" >> /etc/needrestart/needrestart.conf

@coleman-rik
Copy link

how would one disable this prompt interactively?

most of the time it's just an anoyance, but I run a long script of apt-get commands that is always followed by a system reboot.
in this case I don't want the dialog to appear at all, I don't want any services to be restarted, nor do I want them listed. I just need the script to run and update/upgrade what I tell it to do.

the various solutions all seem to require editing a file, shouldn't there be a simple command line argument to supress this dialog?

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment