RPM or DNF commands fail with "database or disk is full"

Solution Verified - Updated -

Issue

  • When running RPM or DNF commands (such as rpm --rebuilddb, rpm -ev, or dnf update), the operation fails with one of the following error messages:

    error: sqlite failure: CREATE INDEX IF NOT EXISTS 'Basenames_key_idx' ON 'Basenames'(key ASC): database or disk is full
    error: cannot open Basenames index using sqlite - No such file or directory (2)
    error: cannot open Packages database in /var/lib/rpm
    
    error: DELETE FROM 'Basenames' WHERE hnum=?: 13: database or disk is full
    error: sqlite failure: RELEASE 'Basenames': no such savepoint: Basenames
    error: sqlite failure: RELEASE 'rwlock': no such savepoint: rwlock
    
  • Running sqlite3 /var/lib/rpm/rpmdb.sqlite "VACUUM;" returns a similar error:

    # sqlite3 /var/lib/rpm/rpmdb.sqlite "VACUUM;"
    Error: database or disk is full
    

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content