For a long time apt update
or apt-get update
would often hang while getting updates.
The way around it was to spam apt update
several time until it works. But recently I discovered that if I run apt clean
before apt update
apt-get never hangs for me.
So of course I wrote myself a script called apt-update and placed it in /usr/bin/apt-update
#!/bin/bash
sudo apt clean && sudo apt update
However, this is still a hack and I would prefer to use some established or more elegant solution.
Does apt not support some flag or option to force the equivalent of apt clean
before getting updates?
apt update
would reliably hang. I haven't had an 'update' hang in years....