apt-get is stuck at "Fetched XXKb in XXsec" [duplicate]

Solution 1:

This is a known bug and has been fixed. From a comment in the bug tracker, installing the following packages manually solves the problem, at least for me (the URLs are for amd64, adjust URLs for other architectures):

cd /tmp && mkdir asfix
cd asfix
wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i *.deb
cd ..
rm -r asfix

Solution 2:

The bug has been fixed. The packages can be downloaded and installed by opening a terminal (press Ctrl+Alt+T) and running the following three commands:

wget http://launchpadlibrarian.net/259142419/libappstream3_0.9.4-1ubuntu1_amd64.deb http://launchpadlibrarian.net/259142413/gir1.2-appstream_0.9.4-1ubuntu1_amd64.deb http://launchpadlibrarian.net/259142412/appstream-index_0.9.4-1ubuntu1_all.deb http://launchpadlibrarian.net/259142418/appstream_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i libappstream3_0.9.4-1ubuntu1_amd64.deb gir1.2-appstream_0.9.4-1ubuntu1_amd64.deb appstream-index_0.9.4-1ubuntu1_all.deb appstream_0.9.4-1ubuntu1_amd64.deb
sudo apt update