This is an old revision of the document!
apt package management
I recently had a sudo apt upgrade
error along the lines of:
mariadb-server : Depends: mariadb-server-10.3 (>= 1:10.3.25-0ubuntu0.20.04.1) but 1:10.3.23+maria~bionic is installed
Basically the apt / dpkg package manger got confused with the old distribution installation. I suspect this only happen as I updated the distribution from Ubuntu 18.04 to 20.04. Basically the apt upgrade
stopped working and repeated the above error. I could no longer update my system.
To repair I need to do the following:
- Backup the databases (not described here)
sudo dpkg -P mariadb-server
to remove just the old package that was confusing apt package managersudo apt –fix-broken install
to fix the broken packagesudo apt autoremove
to remove the old packagessudo apt install mariadb-server
to install the full correct current packagesudo apt update
to update the system package listingsudo apt upgrade
to update the install system packages that was no functional
After this I found upon checking the database that the original data was still intect, so I did not need to restore the data from the backup.