I've recently installed Fedora 19. Packagekit-command-not-found is installed. But its own examples don't work. When I enter gedti the output is:

bash: gedti: command not found... Similar command is: 'gedit'

And it works correctly but when I enter powertop, the output is:

bash: powertop: command not found...

With no suggestion about the package. Why? Should I edit some configuration files or update some cache or ... ?


There is definitely some weirdness with PackageKit. I already had powertop installed but wanted to test out what you're having issues with.

$ rpm -ql PackageKit-command-not-found

So from the above you can run the command that PackageKit will run to do the search like so:

$ /usr/libexec/pk-command-not-found <command>


$ /usr/libexec/pk-command-not-found powertop
bash: powertop: command not found...

$ which powertop

Running it a 2nd time I got it to recommend powertop:

$ /usr/libexec/pk-command-not-found powertop
bash: powertop: command not found...
Install package 'powertop' to provide command 'powertop'? [N/y] 

So why isn't it finding powertop?

I think that ultimately the root cause is the timeout that's defined in the config file: /etc/PackageKit/CommandNotFound.conf:


This timeout is to cap how long PackageKit will take to do it's query. The query is not against your local Yum cache, it's searching live against Yum repositories that you have configured on the internet. Therefore if you want it to be more thorough vs. more performant you have the following trade-off:

# aggressive find

# more responsive
  • I did the same but didn't get the recommendation.
    – Farzam
    Jul 12 '13 at 20:58
  • @Farzam What's your timeout set to in the CommandNotFound.conf file?
    – slm
    Jul 12 '13 at 20:59
  • I've set it to 15000, 150000, 1500000, ... but didn't work. Does it connect to internet? Can I add -C flag to its search command?
    – Farzam
    Jul 12 '13 at 21:07
  • @Farzam - it uses a different mechanism that the completion.
    – slm
    Jul 12 '13 at 21:12
  • so what should I do? It also doesn't work when I'm disconnected from the internet.
    – Farzam
    Jul 12 '13 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.