Power outage during Linux upgrade

in Categories: Linux, Raspberry Pi, Terminal, ZSH.

1 minute read

Here is a few examples what power outages can do, while running updates.

Today we were updating our Raspberry Pi 4 to Debian 13 (Trixie) and out of a sudden the power went out. The first thing that we noticed, when running the sudo apt update command was this:

E: Problem parsing dependency 20 of python3-dbus-fast:armhf=2.44.1-1
E: Error occurred while processing python3-dbus-fast (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/deb.debian.org_debian_dists_trixie_main_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.

Here is how to fix that:

sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update

Then the zsh started to give us an error: zsh: corrupt history file /home/go/.zsh_history

So here is how to fix that:

mv ~/.zsh_history ~/.zsh_history.old
strings ~/.zsh_history.old > ~/.zsh_history
fc -R ~/.zsh_history

This article has been published under the following tags:

Did you find this article useful?

You already voted!