[Bug 2133927] Re: command-not-found shows outdated package version

Julian Andres Klode 2133927 at bugs.launchpad.net
Mon Dec 8 08:38:37 UTC 2025


I can reproduce this in a fresh noble lxd container

root at noble:~# nvim
Command 'nvim' not found, but can be installed with:
snap install nvim    # version v0.11.5, or
apt  install neovim  # version 0.7.2-8
See 'snap info nvim' for additional versions.

Unfortunately, this is accurate, the repository lists 0.7.2-8 as the
version for neovim in the Commands file:

name: neovim
version: 0.7.2-8
commands: editor,ex,nvim,rview,rvim,vi,view,vim,vimdiff

This is another side effect of the commands files not having been
updated for the 24.04 release. Unfortunately these files are frozen in
place and cannot be updated.

** Changed in: command-not-found (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/2133927

Title:
  command-not-found shows outdated package version

Status in command-not-found package in Ubuntu:
  Triaged

Bug description:
  System:
  - Linux Mint 22.2 "Zara" (based on Ubuntu 24.04 "noble")
  - neovim not yet installed
  - package source: https://mirror.init7.net/ubuntu noble/universe

  What I see:

  When I run `apt-cache policy neovim` I get:

    neovim:
      Installed: (none)
      Candidate: 0.9.5-6ubuntu2
      Version table:
         0.9.5-6ubuntu2 500
            500 https://mirror.init7.net/ubuntu noble/universe amd64 Packages

  So the current candidate version is clearly 0.9.5-6ubuntu2.

  If I then just type `nvim` in a terminal, I get the usual message from
  `command-not-found`:

    Command 'nvim' not found, but can be installed with:
      sudo apt install neovim  # version 0.7.2-8

  The install suggestion itself (`sudo apt install neovim`) is correct,
  but the version comment is wrong and outdated (0.7.2-8 instead of 0.9.5-6ubuntu2).

  Expected behaviour:

  - `command-not-found` should either:
    - show the current candidate version from apt (0.9.5-6ubuntu2 in this case), or
    - not show a specific version at all if it cannot guarantee that its internal
      database is in sync with the current APT metadata.

  Why this matters:

  For experienced users this is mostly a cosmetic issue, but for new users it is very confusing:
  they see an "official" system hint that suggests an old package version, while tools
  like `apt-cache policy` show a newer one.

  From a UX and documentation perspective this looks like a contradiction inside the system and
  can undermine trust in the package manager. It would be better if `command-not-found` did not
  present a hard-coded or outdated version number in its suggestion.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/2133927/+subscriptions




More information about the foundations-bugs mailing list