If Not True Then False

DNF/YUM Autocomplete (package names/commands) on Fedora/CentOS/RHEL - Comment Page: 1

This is quick tip, howto use Bash auto complete (autocomplete) with DNF/YUM (package names/commands) on Fedora, CentOS, Red Hat (RHEL). Dnf package manager is used on Fedora 26/25/24/23/22 and Yum package manager is used on Fedora 21/20/19/18, CentOS 7.3/6.9 and Red Hat (RHEL) 7.3/6.9. Autocomplete feature is familiar to many who have used the Debian based Linux, like Debian and Ubuntu. For some...


Leave a Comment

Your email address will not be published. Required fields are marked *

Input your comment.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.


I already had the package installed, not sure from what, but it will only autocomplete if I am su and not my normal user. Any reason for that?

reply Reply

Hi Jacob,

The problem is that the yum completion uses yum -C … which uses the root cache. This same issue is also reported as bug and might be fixed later by yum developers.

So currently best and only way to use it is just change to root user and use autocomplete then.

reply Reply

“So currently best and only way” … that’s a provocative statement for an open source software. As I don’t find completion for my centos (centos first time user) I don’t dare to post a solution here but fixing it yourself is definitely a way and proves the statement wrong ;)

reply Reply

I have bash-completion installed on my Fedora 16 and its the latest version.
How ever i am able to tab-complete “Yum commands” but i cannot tab-complete “Yum Packages”.
Do you know how to resolve this issue.

reply Reply

Hi Abhijeet,

Are you trying completion as normal user or root user?

Btw, it’s maybe time to upgrade your whole system, example to Fedora 19.

reply Reply

Just wanted to say that my fedora 18 do autocomplete. I didn’t need to install it.
But this is a great tip. As a lazy person, I love autocomplete hahaha

reply Reply

On Fedora 26 with dnf-plugins-core-2.1.3-1.fc26.noarch and python3-dnf-plugins-core-2.1.3-1.fc26.noarch installed I still do not see bash completion for plugins.

try: sudo dnf b
You should get options including “builddep” but there is no completion.

FWIW, Debian/Ubuntu have working completion for: sudo apt-get build-dep

reply Reply