If you are having troubles with tab completion for apt-get in a Debian distro, simply open a shell and su to root. Type:

echo ‘. /etc/bash_completion’ >> ~/.bashrc

Don’t forget to edit .bashrc and uncomment the lines related to color, if you need color in