Update: 5) The problem only affects 'apt-get install', not 'apt-get update'. 6) A workaround is to use --foreground timeout --foreground 1m apt-get -y install bc This will finish successfully without any delay or strange exit-code. However, this is a workaround. 'apt-get install' will launch child processes and if they should hang only the parent process will be killed.