Error: Failed to prepare transaction: invalid or corrupted database

Hi everyone,

I would appreciate immensely if you could try to help me fix the following problem:

When I try to update or install anything, it appears this error: “Error: Failed to prepare transaction: invalid or corrupted database”

I looked at similar issues in the forum, but nothing worked.

When I ran:

sudo pacman -Scc
sudo pacman-mirrors -f5
sudo pacman -Syyu

OR

sudo pacman-mirrors --api --set unstable
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu

They both stopped with:

error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))
System:
  Kernel: 5.15.25-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=a2516510-96ae-4a13-ba0c-413ba8b9a795 rw quiet
    udev.log_priority=3
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1
    vt: 7 dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Inspiron 5570 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0DRPKR v: X07 serial: <superuser required> UEFI: Dell
    v: 1.0.0 date: 08/07/2017
Battery:
  ID-1: BAT0 charge: 30.7 Wh (100.0%) condition: 30.7/42.0 Wh (73.1%)
    volts: 12.8 min: 11.4 model: SMP DELL Y3F7Y6B type: Li-ion serial: <filter>
    status: Full
  Device-1: hidpp_battery_1 model: Logitech MX Keys Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: Discharging
Memory:
  RAM: total: 7.54 GiB used: 6.14 GiB (81.4%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i5-8250U bits: 64 type: MT MCP arch: Coffee Lake
    family: 6 model-id: 0x8E (142) stepping: 0xA (10) microcode: 0xEC
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 800 min/max: 400/3400 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 bogomips: 28808
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt
    cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts
    epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr
    ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr
    nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln
    pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep sgx
    smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2
    tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic
    xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Dell driver: i915 v: kernel ports:
    active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:5917 class-ID: 0300
  Device-2: AMD Topaz XT [Radeon R7 M260/M265 / M340/M360 M440/M445 530/535
    620/625 Mobile]
    vendor: Dell driver: amdgpu v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 4 link-max: gen: 3 speed: 8 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 1002:6900 class-ID: 0380
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 1-5:5 chip-ID: 0c45:6a06 class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.3 compositor: xfwm v: 4.16.1 driver:
    X: loaded: amdgpu,ati,modesetting alternate: fbdev,vesa gpu: i915
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3")
    s-diag: 583mm (23") monitors: <missing: xrandr>
  Monitor-1: eDP-1 model: BOE Display built: 2015 res: 1920x1080 dpi: 142
    gamma: 1.2 size: 344x193mm (13.5x7.6") diag: 394mm (15.5") ratio: 16:9
    modes: 1920x1080
  Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel
    v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d71
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.25-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.47 running: yes
Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000
    bus-ID: 02:00.0 chip-ID: 10ec:8136 class-ID: 0200
  IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
    vendor: Dell driver: ath10k_pci v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 bus-ID: 03:00.0 chip-ID: 168c:0042 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Qualcomm Atheros type: USB driver: btusb v: 0.8 bus-ID: 1-7:7
    chip-ID: 0cf3:e009 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 15 state: up address: <filter>
Logical:
  Message: No logical block device data found.
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: f060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 4.78 TiB used: 191.75 GiB (3.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: SK Hynix model: SC311 SATA 256GB
    size: 238.47 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 0P10 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: A-Data model: HD830
    size: 4.55 TiB block-size: physical: 4096 B logical: 4096 B type: N/A
    serial: <filter> rev: 9203 scheme: MBR
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVD+-RW GU90N rev: A1C2
    dev-links: cdrom
  Features: speed: 24 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 238.17 GiB size: 233.38 GiB (97.99%)
    used: 191.75 GiB (82.2%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: a2516510-96ae-4a13-ba0c-413ba8b9a795
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: NO_LABEL
    uuid: F8AA-DE62
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sdb1 maj-min: 8:17 size: 4.55 TiB fs: ext4 label: N/A
    uuid: 0a5b9c57-6300-488a-ad6f-b0128787733f
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-1:33 info: Pixart Imaging Optical Mouse type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 100mA chip-ID: 093a:2510 class-ID: 0301
  Device-2: 1-2:34 info: A-DATA HD830 type: Mass Storage driver: usb-storage
    interfaces: 1 rev: 2.1 speed: 480 Mb/s power: 500mA chip-ID: 125f:a84a
    class-ID: 0806 serial: <filter>
  Device-3: 1-3:18 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s
    power: 98mA chip-ID: 046d:c52b class-ID: 0300
  Device-4: 1-5:5 info: Microdia Integrated_Webcam_HD type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 0c45:6a06 class-ID: 0e02
  Device-5: 1-6:6 info: Realtek RTS5129 Card Reader Controller
    type: <vendor specific> driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc
    interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 0bda:0129
    class-ID: ff00 serial: <filter>
  Device-6: 1-7:7 info: Qualcomm Atheros type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 0cf3:e009
    class-ID: e001
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 51.0 C pch: 47.0 C mobo: 44.0 C sodimm: SODIMM C
    gpu: amdgpu temp: 50.0 C
  Fan Speeds (RPM): cpu: 2649
Info:
  Processes: 291 Uptime: 4d 9h 51m wakeups: 347 Init: systemd v: 250
  tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1576
  lib: 342 Shell: Bash v: 5.1.16 running-in: xfce4-terminal inxi: 3.3.13

You could delete the files in /var/lib/pacman/sync and try again.

(sudo rm /var/lib/pacman/sync/*)

1 Like
1 Like

This worked! Thank you so much :grin:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.