SQLite Forum

Where is the temporary database file stored?
From a little further in the same doc you linked, on how a memory DB and temporary DB are not the same: "The sole difference is that a ":memory:" database must remain in memory at all times whereas parts of a temporary database might be flushed to disk if database becomes large or if SQLite comes under memory pressure."

It is unclear why you want to find the temporary DB file, (which may not be written according to that quote), since it is not persistent past the connection's lifetime. The file backing is logically like a portion of the swap device, something which users hardly need be aware of.