2

Question for Apt

The title pretty much states my entire question, but to rephrase it... What does "reading database" mean when upgrading via apt? Is the database custom, meaning that it does not use mysql or mariadb?

Any suggestions, would be appreciated!

NerdOfCode
  • 2,498

2 Answers2

5

This database has nothing to do with MySQL or MariaDB. apt keeps an internal database of the packages that are available from the repositories it knows about. When you use apt update (or the older version apt-get update), apt checks the repositories for changes and updates that internal database.

In Ubuntu (in fact, in computing in general), there are a whole lot of databases in a whole lot of different shapes and forms. Relational databases like MySQL or MariaDB (or PostgreSQL, or Oracle, or...) are one type that's fairly prominent, but they're far from the only type.

5

It means it's reading the database files... apparently /var/cache/apt/pkgcache.bin and /var/cache/apt/srcpkgcache.bin, though /var/lib/apt/lists/ has info on the sources too, depending on the task it may read one/some/all.

Excerpt from apt-get's man page:

   /var/cache/apt/archives/
       Storage area for retrieved package files.
       Configuration Item: Dir::Cache::Archives.

   /var/cache/apt/archives/partial/
       Storage area for package files in transit.
       Configuration Item: Dir::Cache::Archives
       (partial will be implicitly appended)

   /var/lib/apt/lists/
       Storage area for state information for each package resource specified in
       sources.list(5)
       Configuration Item: Dir::State::Lists.

The other man pages have more info (apt-cache seems particularly relevant), and the source code would be a wealth of info too.

The apt package doesn't depend on mysql or mariadb, so I'm pretty sure it doesn't use them to manage it's database.

Xen2050
  • 8,705