Problem about removing google chrome package

I want to remove google chrome package. But I got the following error, after some googling and I do not find a method to solve it.

$ sudo dnf rm google-chrome-stable
[sudo] password for ruby:
Dependencies resolved.
==================================================================================================================================================
 Package                                 Architecture              Version                                Repository                         Size
==================================================================================================================================================
Removing:
 google-chrome-stable                    x86_64                    107.0.5304.110-1                       @google-chrome                    300 M
Removing unused dependencies:
 liberation-fonts                        noarch                    1:2.1.5-3.fc37                         @rawhide                            0

Transaction Summary
==================================================================================================================================================
Remove  2 Packages

Freed space: 300 M
Is this ok [y/N]: y
Running transaction check
error: rpmdbNextIterator: skipping h#    2135
Header V4 DSA/SHA1 Signature, key ID 7fac5991: BAD
Header SHA256 digest: OK
Header SHA1 digest: OK
Error: An rpm exception occurred: package not installed

This is an indicator that your rpmdb is probably corrupt.
Try rebuilding your rpm database: sudo rpm --rebuilddb

1 Like

It is possible that the font package is not installed.
You could try that with the --noautoremove option to skip the font package and see what it tells you then. The font package comes from fedora and chrome comes from google.

BTW, I just moved one system to F37 last night and it shows

google-chrome-stable                   x86_64                   108.0.5359.71-1                      @google-chrome                   301 M

If you installed it from the google repo you can open gnome software and remove it from there.

I tried and remove chrome, still the same error

ruby: ~
$ sudo rpm --rebuilddb
[sudo] password for ruby:
ruby: ~
$ sudo rpm --rebuilddb -v
ruby: ~
$ sudo dnf rm google-chrome-stable
Dependencies resolved.
==================================================================================================================================================
 Package                                 Architecture              Version                                Repository                         Size
==================================================================================================================================================
Removing:
 google-chrome-stable                    x86_64                    107.0.5304.110-1                       @google-chrome                    300 M
Removing unused dependencies:
 liberation-fonts                        noarch                    1:2.1.5-3.fc37                         @rawhide                            0

Transaction Summary
==================================================================================================================================================
Remove  2 Packages

Freed space: 300 M
Is this ok [y/N]: y
Running transaction check
error: rpmdbNextIterator: skipping h#    1393
Header V4 DSA/SHA1 Signature, key ID 7fac5991: BAD
Header SHA256 digest: OK
Header SHA1 digest: OK
Error: An rpm exception occurred: package not installed
$ sudo dnf remove google-chrome-stable --noautoremov
Dependencies resolved.
==================================================================================================================================================
 Package                                 Architecture              Version                                Repository                         Size
==================================================================================================================================================
Removing:
 google-chrome-stable                    x86_64                    107.0.5304.110-1                       @google-chrome                    300 M

Transaction Summary
==================================================================================================================================================
Remove  1 Package

Freed space: 300 M
Is this ok [y/N]: y
Running transaction check
error: rpmdbNextIterator: skipping h#    1393
Header V4 DSA/SHA1 Signature, key ID 7fac5991: BAD
Header SHA256 digest: OK
Header SHA1 digest: OK
Error: An rpm exception occurred: package not installed

Try reinstalling the chrome package from google. Maybe it is missing a key?

That was going to be my suggestion. Do a reinstall of google-chrome-stable so the rpm database is up to date, then remove it.

That last message specifically told you it has a bad key.

Take a look at the recovery steps here, rpm.org - RPM Database Recovery

You can either install Google-Chrome creating a specif repository or download an .rpm package that creates the repository allowing updates : either way is fully documented on their website. You’re reporting error from DNF package manager, remove specific repository file in /etc/yum.repos.d with console command rm. After, to keep yourself reassured, run ‘dnf clean all’.

You’re on Rawhide; you need to follow the development and/or QA mailing lists more closely. https://docs.fedoraproject.org/en-US/releases/rawhide/#_discussing_rawhide Ask is for stable releases only.

This is why a lot of answers are somewhat incorrect guesses. The problem here is that Google still uses the insecure SHA1 hashes and Rawhide rpm is more strict. You will need to loosen up your crypto policies to allow it to process the chrome rpm:

sudo update-crypto-policies --set LEGACY
3 Likes

This did the trick for me, cheers mate

(adding information for people searching for solutions)

The official “code” packages (Visual Studio Code, vscode) have the same problem and it can also be worked around with the command Elliott provided.

This issue happened to me today, on a Sunday night when I need Chrome in the morning at 8am. Not a fun time. I am running Fedora 38, latest updates, 3900x, 64GB ram and did nearly everything above, including reinstalling and reboots. I had to force power down my machine (power button) to force Fedora to offer the selecting the kernel menu. I was running kernel 6.3.6 and selected the previous 6.3.5 and booted up. Now Chrome installs properly and I can access all my bookmarks and saved sites. It would seem if you are using Fedora, it is not always a browser issue. Might be the latest kernel… But I defer confirmation of that to people smarter than me in Kernel design… Hope this helps someone else while Fedora and Chrome issue patches…