Make sure you have a good backup BEFORE you do anything.
If the dpkg command and force install did not fix the problem, the next step is to remove the software completely and re-install it.
Code:
sudo apt remove ubuntu-keyring
This command should not remove related configuration files (the --purge option would do that though)
Now clean up the unused packages that are left over:
Code:
sudo apt clean
sudo apt autoremove
sudo apt update
Now install the software again:
Code:
sudo apt install ubuntu-keyring
If that does not fix it, then as a last resort, you may need to be more aggressive in the removal such as including "--purge" and then look into manually removing files by seeing what it installs with this command:
Code:
sudo ls -l /var/lib/dpkg/info | grep -i ubuntu-keyring
On my Ubuntu 18.04 server, I see this as a result:
Code:
-rw-r--r-- 1 root root 619 Apr 1 06:00 ubuntu-keyring.list
-rw-r--r-- 1 root root 828 Mar 29 09:33 ubuntu-keyring.md5sums
-rwxr-xr-x 1 root root 642 Mar 29 09:33 ubuntu-keyring.postinst
I could then manually remove the files with these commands:
Code:
rm /var/lib/dpkg/info/ubuntu-keyring.list
rm /var/lib/dpkg/info/ubuntu-keyring.md5sums
rm /var/lib/dpkg/info/ubuntu-keyring.postinst
Then I would update and re-install the package.
LHammonds
Bookmarks