apt update failing because it can't connect to ppa.launchpad.net

When I try to update using apt update, I get the following errors.

Err:10 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease
Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out Could not   connect to ppa.launchpad.net:80 (2001:67c:1560:8008::15), connection timed out
Err:11 http://ppa.launchpad.net/js-reynaud/kicad-5.1/ubuntu bionic InRelease
Unable to connect to ppa.launchpad.net:http:
Err:12 http://ppa.launchpad.net/tista/plata-theme/ubuntu bionic InRelease
Unable to connect to ppa.launchpad.net:http:
Err:13 http://ppa.launchpad.net/ubuntubudgie/backports/ubuntu bionic InRelease
Unable to connect to ppa.launchpad.net:http:
Err:14 http://ppa.launchpad.net/zeal-developers/ppa/ubuntu bionic InRelease
Unable to connect to ppa.launchpad.net:http:
Fetched 7,502 B in 31s (238 B/s)
Reading package lists...
Building dependency tree...
Reading state information...
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: Failed to fetch http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/dists/bionic/InRelease  Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out Could not connect to ppa.launchpad.net:80 (2001:67c:1560:8008::15), connection timed out
W: Failed to fetch http://ppa.launchpad.net/js-reynaud/kicad-5.1/ubuntu/dists/bionic/InRelease  Unable to connect to ppa.launchpad.net:http:
W: Failed to fetch http://ppa.launchpad.net/tista/plata-theme/ubuntu/dists/bionic/InRelease  
Unable to connect to ppa.launchpad.net:http:
W: Failed to fetch http://ppa.launchpad.net/ubuntubudgie/backports/ubuntu/dists/bionic/InRelease  Unable to connect to ppa.launchpad.net:http:
W: Failed to fetch http://ppa.launchpad.net/zeal-developers/ppa/ubuntu/dists/bionic/InRelease  Unable to connect to ppa.launchpad.net:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.

The thing is that I can visit these links from my web browser so it must not be a issue with the servers.

And I have tried forcing IPV4 only when updating to see if its IPV6 issue. Also I have tried removing all those ppas and adding them again.


Okay it is solved now, when I connected to the network in my college hostel. Was probably some issue with the ISP or router maybe.

UPDATE:

Ok I actually found out the issue and I thought it would be nice to add it to the discussion here so that other people might find it helpful.

The problem was that ipv6 was not enabled in my home internet modem. So I went to the modem configuration ip address and enabled it and the issue got solved in my home too.

It might also be the case that your ISP does not support ipv6, which is the case with BSNL in India, so look out for that too.


When I experience this (occasionally with no network changes), I find that using apt-get instead of apt works.