Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
Article5 min readViews0

Package Updated, But Process Uses Old Library: Checking needrestart

In Ubuntu, we read the list of processes with outdated libraries without automatic restart and separate the result from the disk state of packages.

Comments 0

A two-state learning model: the package on disk is updated, but the running process uses the old code.
In this article

The package manager shows an installed library update, yet the application has been running without a restart for several weeks. These facts describe different states. The file on disk may have changed while the process continues to use previously loaded code. A check after an update must account for running processes, not just the record of the installed package.

For initial diagnostics in Ubuntu 24.04 LTS, you can use the installed needrestart utility. Below we consider the documented list-only output mode for package version 3.6-7ubuntu4.5. The reference was verified on September 27, 2026. The utility is absent in the available test environment, so its execution result on the stand is not claimed. Installation, updates, and restarts are not included in the instructions.

Check the monitored area

Work must be performed on the system where the processes of interest are running. Updating a package on the host does not prove the container contents have been updated, and checking inside a container does not describe all host processes. If an application is installed separately, the package manager's system data may not cover its components.

Viewing system processes requires appropriate authorized permissions. Execution with elevated privileges must be delegated to an administrator; access restrictions must not be bypassed. If needrestart is not set, do not set it in the production environment solely for this check without an approved change procedure.

Run the list mode specifically

needrestart -r l -l

The command has two distinct roles with similar symbols. After -r, a separate argument l follows—a lowercase Latin letter that specifies list-only mode. The final parameter -l restricts the check to outdated libraries. This is not the digit 1, nor does it automatically allow service restarts.

Do not shorten the example to a single program name or replace the mode argument: the utility supports both interactive and automatic restart modes. These are not used here. Explicitly specified command-line parameters take precedence over corresponding environment variables, as documented for the utility.

The check reads process and library information. On a system with a large number of processes, this may take time and create additional work for reviewing the data. Run it once at an appropriate time; do not include it in frequent infinite polling. If access or execution errors occur, save them along with the result.

How to read the found matches

The resulting list indicates which active components the utility links to outdated libraries. This serves as a basis to verify the specific process and formulate a plan to update its runtime state. It does not automatically report whether connections can be severed now or what tasks are currently running within the service.

Example scenario: the library was updated at 12:00, the application process started at 09:00, and was detected during the check at 12:10. These timestamps are consistent with the use of a previously loaded library. However, the start time alone is only an indirect indicator. The report requires the utility's result, process identification, and details about the updated component, not a guess based on the process age.

The result also does not confirm a specific vulnerability. The presence of the required fix is established via vendor notifications, OS releases, and the full package version. The process list answers a narrower question: where the runtime state requires additional attention after library replacement.

Why an empty list does not end the entire audit

In the command shown, only the library check class was specifically selected. Its result does not allow conclusions about the new kernel, all manual installations, or all containers. Furthermore, the tool's capabilities and read permissions limit observation. The absence of lines without error checking should not be interpreted as a statement that 'all processes are definitely updated.'

If broader control is needed, it should be planned separately for the relevant components. Do not expand permissions or change utility settings just to generate an empty report. First, determine exactly what failed verification and who has standard access to this information.

From the list to the action plan

Restarting an application can break connections, stop background processing, or affect the store's exchange with external systems. Therefore, the candidate list is not a queue of commands for immediate execution. A responsible person, an agreed-upon procedure, configuration verification, a recovery method, and criteria for successful service restoration are required.

After such a separately prepared change, repeat the initial diagnostics and verify the user scenario. Installing the package, using corrected code in a running process, and store operability are three distinct results. This guide helps obtain information about the second outcome without mistaking it for the completion of the entire work.

Discussion 0

Share your experience and ask questions. Comments without links appear after editorial review.

No comments yet. Start the discussion.