As I discussed in a previous post, my homelab services are powered by DietPi Linux Virtual machines. These VMs serve as the backbone of my setup, allowing me to manage and maintain a range of essential services. However, a recent challenge emerged as I embarked on an attempt to update my DietPi installation. The process that had been smooth sailing before suddenly presented unforeseen issues. In the face of this unexpected hurdle, I delved into troubleshooting mode to uncover the root cause and find a solution that would restore the seamless functionality I had come to rely on. In the following sections, I’ll share my experiences with this update ordeal and the steps I undertook to fix the issues I faced. I got the following error trying to update DietPi
Errors were encountered while processing: /var/cache/apt/archives/linux-image-5.10.0-23-arm64_5.10.179-2_arm64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) [ FAILED ] DietPi-Update | APT upgrade
Outlined below are a set of concise steps designed to swiftly restore your working OS. However, it’s important to approach this process with caution due to its potential to trigger additional complications within your Linux install. Safeguard your data by ensuring you have a backup in place or by creating a snapshot of the virtual machine prior to proceeding with the following steps.
Find all linux-images installed on your machine:
-
dpkg --list |grep linux-image
Adjust this as needed to clean up. You may just need to clean up linux-image-arm64. You may need to clean linux-image-5.10.x.x.x.
Like so:
-
sudo apt purge linux-image-5.10.0-1*
Now it is important that you do not restart. install the latest with “sudo apt install linux-image-arm64” I also recommend running:
-
apt-get -y --with-new-pkgs upgrade\
Please proceed to run Dietpi-Update once more. Afterward, restart your system and verify that everything is functioning as expected.
As you navigate through the intricacies of your projects and endeavors, I extend my warmest wishes for a fantastic end of the summer season. May your days be filled with productivity, exploration, and moments of rejuvenation. Remember to prioritize safety in all your undertakings, ensuring that this season becomes a memorable chapter in your journey. Here’s to a remarkable summer, brimming with accomplishments and well-deserved enjoyment. Stay safe!