It seems that sometimes smart bash completion is turned off by default so second commands and such as in apt install packagename are not auto completed. To activate it, in /etc/bash.bashrc
file uncomment the following lines:
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi