Recovering Ubuntu apt upgrade after connection reset
user: was my internet cut while doing updates on my Ubuntu 26.04 laptop. It was almost done downloading all the updates.I tried fix missing, and I guess I'm typing it in wrong:
Get:108 https://download.docker.com/linux/ubuntu resolute/stable amd64 docker-compose-plugin amd64 5.6.0-1~ubuntu.26.04~resolute [8,081 kB]
Fetched 1,287 MB in 48min 37s (441 kB/s)
E: Failed to fetch https://packages.mozilla.org/apt/pool/mozilla/firefox_157.0%7ebuild1_amd64_c15ffad82e225d4a55ae6dff9b6cee9a.deb OpenSSL system call error: error:00000000:lib(0)::reason(0) - openssl (104: Connection reset by peer) Error reading from server - read (104: Connection reset by peer) [IP: 34.160.78.70 443]
E: Failed to fetch https://packages.mozilla.org/apt/pool/mozilla/firefox-devedition_158.0b4%7ebuild1_amd64_729ef6f81bfc9d771c83f6e308e372c5.deb OpenSSL error: error:0A000126:SSL routines::unexpected eof while reading Error reading from server - read (5: Input/output error) [IP: 34.160.78.70 443]
E: Unable to fetch some archives, maybe run apt update or try with --fix-missing?
adam@rogstrix:~/code$ sudo apt --fix-missing
[sudo: authenticate] Password:
apt 3.2.0 (amd64)
Usage: apt [options] command
assistant: Yes — this looks like a temporary network/server connection interruption while `apt` was downloading the Mozilla packages. The important part is that it failed on only a couple of `.deb` files near the end; it does **not** look like your update process corrupted anything.
Your command was just missing the actual `apt` action. `--fix-missing` is an option, not a command.
Run this:
```bash
sudo apt update
sudo apt upgrade --fix-missing
```
If you had originally been doing a full upgrade, use:
```bash
sudo apt full-upgrade --fix-missing
```
What happened is consistent with these errors:
```text
Connection reset by peer
unexpected eof while reading
Unable to fetch some archives
```
That usually means the connection to Mozilla's package server dropped or was interrupted. `apt` should reuse packages it already downloaded rather than starting the entire 1.287 GB over again.
Afterward, I would also run:
```bash
sudo dpkg --configure -a
sudo apt -f install
```
Then check whether anything is still pending:
```bash
apt list --upgradable
```
So the safest sequence for you right now is:
```bash
sudo apt update
sudo apt full-upgrade --fix-missing
sudo dpkg --configure -a
sudo apt -f install
apt list --upgradable
```
You should **not** need to delete the apt cache or redownload everything. Based on your output, Docker Compose and most of the other packages had already downloaded successfully; Firefox and Firefox Developer Edition were the two obvious failures.
user: wow, I'm not sure if I want full upgrade, it looks like it wants to do a lot more changes including downgrade a couple things. I canceled that and said no.
assistant: Canceling was sensible. `full-upgrade` is more aggressive than you need for this situation: it can install/remove packages to satisfy dependency changes, and if it was proposing downgrades or a lot of unexpected changes, I would not push ahead blindly.
Since your original problem was just two failed downloads, use the conservative path instead:
```bash
sudo apt update
sudo apt upgrade --fix-missing
```
Before answering `Y`, read the summary carefully. If it still proposes removals, downgrades, or anything surprising, cancel again and show me that summary.
You can also check whether the interrupted run left anything half-configured:
```bash
sudo dpkg --configure -a
sudo apt -f install
```
Those two commands are repair-oriented; they don't intentionally perform a broad distribution upgrade.
And to see what's still pending without changing anything:
```bash
apt list --upgradable
```
So yes: I would avoid `full-upgrade` for now. The failed Mozilla downloads do not, by themselves, justify a broad package reshuffle.
user: ok, I guess it's done. I see this at the end, should I reboot?:
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
adam@rogstrix:~$
assistant: Yes, I would reboot now.
That ending is normal. `os-prober` found your Windows Boot Manager and regenerated the boot menu entries successfully. The final `done` and return to the shell prompt are both good signs.
Use:
```bash
sudo reboot
```
After Ubuntu comes back up, you can do a quick sanity check with:
```bash
sudo apt update
apt list --upgradable
```
If that comes back clean or only shows a few ordinary pending packages, you're in good shape.
Showing first 6 of 6 messages. View the full conversation at https://mcwai.org/ai-conversation/recovering-ubuntu-apt-upgrade-after-connection