DNF cannot install

Hi,

I recently moved from a Thinkpad X1 Extreme Gen 2 to a Thinkpad T14 Gen 6. Both are Intel models.

I migrated to the new machine by pulling the SSD (unencrypted) out of the X1 and placing it in the T14.

I don’t know if this issue was caused by this migration, but I cannot install ANY packages to Fedora.

Your help is very much appreciated!

Thanks,

-fjfj765

Here’s my system info:

# System Details Report
---

## Report details
- **Date generated:**                              2025-12-15 18:04:13

## Hardware Information:
- **Hardware Model:**                              Lenovo ThinkPad T14 Gen 6
- **Memory:**                                      16.0 GiB
- **Processor:**                                   Intel® Core™ Ultra 5 225U × 14
- **Graphics:**                                    Intel® Graphics (ARL)
- **Disk Capacity:**                               128.0 GB

## Software Information:
- **Firmware Version:**                            N4JET21W (1.11 )
- **OS Name:**                                     Fedora Linux 43 (Workstation Edition)
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               49
- **Windowing System:**                            Wayland
- **Kernel Version:**                              Linux 6.17.9-300.fc43.x86_64

Here is the console’s output:

agu@fedora:~$ sudo dnf install asciiquarium
Updating and loading repositories:
 Copr repo for PyCharm owned by phracek                                                                                                                                    100% | 538.0   B/s | 632.0   B |  00m01s
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/phracek/PyCharm/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:5000:4:bbc1:1840:93a1) - https://download.copr.fedorainfraclou
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/phracek/PyCharm/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:5000:4:bbc1:1840:93a1) - https://download.copr.fedorainfraclou
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/phracek/PyCharm/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:5000:4:bbc1:1840:93a1) - https://download.copr.fedorainfraclou
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/phracek/PyCharm/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:5000:4:bbc1:1840:93a1) - https://download.copr.fedorainfraclou
>>> Usable URL not found                                                                                                                                                                                           
 Copr repo for python-validity owned by sneexy                                                                                                                             100% | 579.0   B/s | 632.0   B |  00m01s
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/sneexy/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorain
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/sneexy/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorain
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/sneexy/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorain
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/sneexy/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorain
>>> Usable URL not found                                                                                                                                                                                           
 Copr repo for python-validity owned by tigro                                                                                                                              100% | 578.0   B/s | 632.0   B |  00m01s
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/tigro/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainf
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/tigro/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainf
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/tigro/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainf
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/tigro/python-validity/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainf
>>> Usable URL not found                                                                                                                                                                                           
 Copr repo for keyd owned by alternateved                                                                                                                                  100% | 578.0   B/s | 632.0   B |  00m01s
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/alternateved/keyd/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainfracl
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/alternateved/keyd/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainfracl
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/alternateved/keyd/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainfracl
>>> Status code: 404 for https://download.copr.fedorainfracloud.org/results/alternateved/keyd/fedora-40-x86_64/repodata/repomd.xml (IP: 2600:9000:25f2:3e00:4:bbc1:1840:93a1) - https://download.copr.fedorainfracl
>>> Usable URL not found                                                                                                                                                                                           
Repositories loaded.
Package "asciiquarium-1.1-26.fc43.noarch" is already installed.

Package                                                                 Arch            Version                                                                  Repository                                    Size
Removing:
 kernel-core                                                            x86_64          6.11.5-200.fc40                                                          <unknown>                                 71.1 MiB
 kernel-core                                                            x86_64          6.14.4-100.fc40                                                          updates                                   75.6 MiB
 kernel-core                                                            x86_64          6.14.5-300.fc42                                                          updates                                   76.1 MiB
 kernel-modules                                                         x86_64          6.11.5-200.fc40                                                          <unknown>                                 62.7 MiB
 kernel-modules-core                                                    x86_64          6.11.5-200.fc40                                                          <unknown>                                 36.7 MiB
 kernel-modules-core                                                    x86_64          6.11.7-200.fc40                                                          <unknown>                                 36.7 MiB
 kernel-modules-core                                                    x86_64          6.12.6-100.fc40                                                          <unknown>                                 37.0 MiB
 kernel-modules-core                                                    x86_64          6.12.9-100.fc40                                                          <unknown>                                 37.1 MiB
 kernel-modules-core                                                    x86_64          6.13.8-100.fc40                                                          <unknown>                                 37.8 MiB
 kernel-modules-core                                                    x86_64          6.13.10-100.fc40                                                         <unknown>                                 37.8 MiB
 kernel-modules-core                                                    x86_64          6.14.3-100.fc40                                                          <unknown>                                 38.6 MiB
 kernel-modules-core                                                    x86_64          6.14.4-100.fc40                                                          updates                                   38.6 MiB
 kernel-modules-core                                                    x86_64          6.14.5-300.fc42                                                          updates                                   38.9 MiB

Transaction Summary:
 Removing:          13 packages

After this operation, 625 MiB will be freed (install 0 B, remove 625 MiB).
Is this ok [y/N]: y
Running transaction
[ 1/14] Prepare transaction                                                                                                                                                100% |  10.0   B/s |  13.0   B |  00m01s
[ 2/14] Removing kernel-modules-0:6.11.5-200.fc40.x86_64                                                                                                                   100% |   8.7 KiB/s |   2.3 KiB |  00m00s
>>> Running %postun scriptlet: kernel-modules-0:6.11.5-200.fc40.x86_64                                                                                                                                             
>>> Non-critical error in %postun scriptlet: kernel-modules-0:6.11.5-200.fc40.x86_64                                                                                                                               
>>> Scriptlet output:                                                                                                                                                                                              
>>> depmod: ERROR: could not open directory /lib/modules/6.11.5-200.fc40.x86_64: No such file or directory                                                                                                         
>>> depmod: FATAL: could not search modules: No such file or directory                                                                                                                                             
>>>                                                                                                                                                                                                                
>>> [RPM] %postun(kernel-modules-6.11.5-200.fc40.x86_64) scriptlet failed, exit status 1                                                                                                                           
>>> Running %preun scriptlet: kernel-core-0:6.11.5-200.fc40.x86_64                                                                                                                                                 
>>> Finished %preun scriptlet: kernel-core-0:6.11.5-200.fc40.x86_64                                                                                                                                                
>>> [RPM] DELETE FROM 'Providename' WHERE hnum=?: 11: database disk image is malformed                                                                                                                             
>>> [RPM] DELETE FROM 'Conflictname' WHERE hnum=?: 11: database disk image is malformed                                                                                                                            
>>> [RPM] DELETE FROM 'Obsoletename' WHERE hnum=?: 11: database disk image is malformed                                                                                                                            
>>> [RPM] DELETE FROM 'Triggername' WHERE hnum=?: 11: database disk image is malformed                                                                                                                             
>>> [RPM] DELETE FROM 'Dirnames' WHERE hnum=?: 11: database disk image is malformed                                                                                                                                
>>> [RPM] DELETE FROM 'Installtid' WHERE hnum=?: 11: database disk image is malformed                                                                                                                              
>>> [RPM] DELETE FROM 'Sigmd5' WHERE hnum=?: 11: database disk image is malformed                                                                                                                                  
>>> [RPM] DELETE FROM 'Sha1header' WHERE hnum=?: 11: database disk image is malformed                                                                                                                              
>>> [RPM] DELETE FROM 'Filetriggername' WHERE hnum=?: 11: database disk image is malformed                                                                                                                         
>>> [RPM] DELETE FROM 'Transfiletriggername' WHERE hnum=?: 11: database disk image is malformed                                                                                                                    
>>> [RPM] DELETE FROM 'Recommendname' WHERE hnum=?: 11: database disk image is malformed                                                                                                                           
>>> [RPM] DELETE FROM 'Suggestname' WHERE hnum=?: 11: database disk image is malformed                                                                                                                             
>>> [RPM] DELETE FROM 'Supplementname' WHERE hnum=?: 11: database disk image is malformed                                                                                                                          
>>> [RPM] DELETE FROM 'Enhancename' WHERE hnum=?: 11: database disk image is malformed                                                                                                                             
>>> [RPM] sqlite failure: RELEASE 'rwlock': database disk image is malformed                                                                                                                                       
[ 3/14] Removing kernel-core-0:6.11.5-200.fc40.x86_64                                                                                                                      100% |   1.2 KiB/s |  17.0   B |  00m00s
>>> [RPM] file /usr/share/licenses/kernel-core/COPYING-6.11.5-200.fc40: remove failed: No such file or directory                                                                                                   
[ 4/14] Removing kernel-modules-core-0:6.11.5-200.fc40.x86_64                                                                                                              100% |  18.0 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.11.5-200.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.11.5-200.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
>>> Running %preun scriptlet: kernel-core-0:6.14.5-300.fc42.x86_64                                                                                                                                                 
>>> Finished %preun scriptlet: kernel-core-0:6.14.5-300.fc42.x86_64                                                                                                                                                
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
[ 5/14] Removing kernel-core-0:6.14.5-300.fc42.x86_64                                                                                                                      100% | 139.0   B/s |  17.0   B |  00m00s
>>> [RPM] file /usr/share/licenses/kernel-core/COPYING-6.14.5-300.fc42: remove failed: No such file or directory                                                                                                   
>>> Running %preun scriptlet: kernel-core-0:6.14.4-100.fc40.x86_64                                                                                                                                                 
>>> Finished %preun scriptlet: kernel-core-0:6.14.4-100.fc40.x86_64                                                                                                                                                
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
[ 6/14] Removing kernel-core-0:6.14.4-100.fc40.x86_64                                                                                                                      100% |   1.0 KiB/s |  17.0   B |  00m00s
>>> [RPM] file /usr/share/licenses/kernel-core/COPYING-6.14.4-100.fc40: remove failed: No such file or directory                                                                                                   
[ 7/14] Removing kernel-modules-core-0:6.14.4-100.fc40.x86_64                                                                                                              100% |  48.4 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.14.4-100.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.14.4-100.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
[ 8/14] Removing kernel-modules-core-0:6.14.5-300.fc42.x86_64                                                                                                              100% |  65.6 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.14.5-300.fc42.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.14.5-300.fc42.x86_64: remove failed: No such file or directory                                                                                                                       
[ 9/14] Removing kernel-modules-core-0:6.14.3-100.fc40.x86_64                                                                                                              100% |  63.0 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.14.3-100.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.14.3-100.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
[10/14] Removing kernel-modules-core-0:6.13.10-100.fc40.x86_64                                                                                                             100% |  64.5 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.13.10-100.fc40.x86_64: remove failed: No such file or directory                                                                                                        
>>> [RPM] file /lib/modules/6.13.10-100.fc40.x86_64: remove failed: No such file or directory                                                                                                                      
[11/14] Removing kernel-modules-core-0:6.13.8-100.fc40.x86_64                                                                                                              100% |  63.2 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.13.8-100.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.13.8-100.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
[12/14] Removing kernel-modules-core-0:6.12.9-100.fc40.x86_64                                                                                                              100% |  62.7 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.12.9-100.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.12.9-100.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
[13/14] Removing kernel-modules-core-0:6.12.6-100.fc40.x86_64                                                                                                              100% |  62.7 KiB/s |   3.1 KiB |  00m00s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.12.6-100.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.12.6-100.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
[14/14] Removing kernel-modules-core-0:6.11.7-200.fc40.x86_64                                                                                                              100% |   2.3 KiB/s |   3.1 KiB |  00m01s
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
>>> [RPM] file /usr/share/doc/kernel-keys/6.11.7-200.fc40.x86_64: remove failed: No such file or directory                                                                                                         
>>> [RPM] file /lib/modules/6.11.7-200.fc40.x86_64: remove failed: No such file or directory                                                                                                                       
>>> Running %triggerpostun scriptlet: glibc-common-0:2.39-32.fc40.x86_64                                                                                                                                           
>>> Finished %triggerpostun scriptlet: glibc-common-0:2.39-32.fc40.x86_64                                                                                                                                          
>>> [RPM] DELETE FROM 'Packages' WHERE hnum=?;: 11: database disk image is malformed                                                                                                                               
Transaction failed: Rpm transaction failed.

That doesn’t exactly sound like the correct way to migrate from one computer to another. Because the hardware changed.

However it is possible. The issues I see is that there is a mismatch with the version of the data which shows 404 errors.

So I propose to remove the old repositories which are from F40.

First I would check with sudo dnf4 --refresh if the same errors appear. A 404 error is not a big problem. It just says that the repository is not available on the specific server. In the case of this issue it is the copr server, where the data is not available anymore because F40 is EOL.

Repositories can bee displayed with sudo dnf4 repolist

btw. Welcome to Fedora @fjfj765

1 Like

Your RPM DB is corrupted. This might fix it by rebuilding the DB: sudo rpm --rebuilddb

You also have third party repos pointing to F40 for some reason, leading to 404 errors. May want to adjust or remove those.

1 Like

That’s is an entirely valid way of migrating Fedora from one system to another. I have done that, and it worked out of the box. Linux is not Windows - the Linux kernel carries drivers for “everything” - so it will handle hardware of the new machine without problems.

3 Likes

Please do read the others answers too, so we can avoid to much repetitions … thx.

Thank you for the explanation.