0

Despite that vim is installed on my Fedora 29 system, the command

dnf search vim-common                                                           

returns "No matches found." In contrast, the command

rpm -qa vim-common                                                              

returns the name of the installed RPM file.

I have tried dnf --refresh update, to no avail.

What is going on?

2 Answers 2

0

I don't know what is 'going on' but you could try clearing the problem with:

rpm -e vim-common

and then:

dnf install vim-common
6
  • Thanks for the suggestion, but dnf install vim-common also says "no match".
    – Gidfiddle
    Commented Apr 1, 2019 at 7:40
  • Was the 'rpm -e' command successful in removing the package? You might have needed '--nodeps'. You might also try 'rpmdb --rebuild'
    – wef
    Commented Apr 1, 2019 at 9:24
  • Yes, I first removed the dependencies R-core and meson/ninja. I was able to use dnf remove to remove these dependencies, which I will install again later. Then I used rpm -e to remove vim-common, vim-enhanced, and a half dozen other vim-* packages that rpm knew about.
    – Gidfiddle
    Commented Apr 1, 2019 at 13:13
  • Unfortunately, the rpmdb --rebuilddb command did not solve the problem with dnf. Is there an analogous dnf command? I already tried dnf reinstall dnf.
    – Gidfiddle
    Commented Apr 1, 2019 at 13:18
  • Nothing on the man page AFAICS. You could try 'dnf clean all'.
    – wef
    Commented Apr 1, 2019 at 21:43
0

'dnf search` looks in metadata - i.e. it downloads repofiles from remote repositories and then downloads it to its own cache and search there. DNF does not search in rpmdb.

rpm search only in rpmdb

In your case, DNF is likely unable to download information from remote repositories.

2
  • You're right, the dnf and rpm metadata caches are separate. But dnf also knows what packages are installed, as does rpm. I don't understand why dnf says that vim is not installed when rpm says it is (and indeed it is).
    – Gidfiddle
    Commented Apr 3, 2019 at 0:59
  • DNF is aware of installed package (e.g. for dnf remove) but dnf search is searching only in metadata.
    – msuchy
    Commented Apr 4, 2019 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .