Search notes:

SQLite: Temporary files

The documentation lists nine types of temporary files:
Rollback journals Name is name of database file with -journal appended. Used for atomic commit and rollback. See also pragma locking_mode=exclusive and WAL files.
Super-journals Used when committing transactions on multiple databases (added with attach).
Write-ahead Log (WAL) files Used instead of a rollback journal when operating in WAL mode.
Shared-memory files In Linux: created with mmap(). Name is database file name with -shm appended. Used to share memory accross connections when operating in WAL mode.
Statement journals
Temp databases create temp database
Materializations of views and subqueries
Transient indices Possibly used for order by, group by, distinct, union, except, intersect.
Transient databases used by vacuum

Location

In Unix, the location of the temporary files is determined in the following order:

Index