Bash in my Fedora 16 seems to autocomplete arguments based on the command itself. So if I for example type

cd Tab

… it will only show directories.

There are however far too many commands where it doesn't know the expected input types, so is there any way to disable this feature?

4 Answers 4


Remove the bash-completion package.

  • 1
    You will need to restart any running instances of bash for the change to take effect. Also consider using sudo apt-get --purge remove bash-completion as suggested below. This appears to remove a file from /etc referencing a completion-related file that bash will otherwise complain about.
    – neuralmer
    May 1, 2018 at 14:03
  • 1
    This is what I like to do because I hate the package, but raines's answer is the right one for the question as asked and useful on boxes you can't remove stuff on (because others users want it) May 8, 2020 at 2:20
shopt -u progcomp

will disable program based completion and TAB will do regular file/dir completion again. You can do this on a shell by shell basis (or put in in .bashrc for all shell in your account) rather than remove the bash-completion package for everyone. Running complete -r removes all program completion settings so there are none defined. This means if you want to turn it on again you have to redefine them all again. Whereas if you used shopt -u progcomp to turn it off, you can just run shopt -s progcomp to turn it back on again.

  • 2
    Sounds great, and actually disables it (like the Q asked) instead of removing it entirely. Could put in .bashrc too. Should be the correct answer IMO
    – Xen2050
    Mar 18, 2017 at 9:18

Another way to disable it on a per-user basis is by doing complete -r in your .bashrc file. Type help complete for more information.

  • This is a very good option to take when one doesn't have superuser privileges (e.g., using a computer at a university).
    – rbrito
    Oct 1, 2019 at 19:53

Just removing the package is not enough, you also want to purge the files:

sudo apt-get --purge remove bash-completion

You must log in to answer this question.

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