Speed up Bash ‘Tab’ Auto-Completion When using DNF in Fedora 38

This quick tutorial shows how to make ‘Tab’ key auto-completion fast, when running dnf command in your Fedora Linux.

Bash auto-completion is a quite useful feature that can automatically fill file or package names in command line.

I use the feature quite often. But, in Fedora when using dnf command to install something, it’s quite slow and even freezes sometimes when trying to press ‘Tab’ key to auto-complete or list potential package names.

I was thinking that’s slow performance issue running Fedora in Virtual Machine, until I saw this topic.

By default, dnf command parses the repodata files at each tab completion. According to this merged request, it supports using sqlite cache to complete package names much faster! However, sqlite is not installed in Fedora out-of-the-box.

So, to make ‘Tab’ key auto-completion fast for dnf command, just install sqlite package via the command below:

sudo dnf install sqlite

That’s it. Enjoy!

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.