tmpfs
Also known as: tmpfs ram filesystem, in memory filesystem, tmpfs
tmpfs is a file system that lives in RAM (and swap) instead of on disk. Files written to it are fast and never touch flash storage, but they vanish on reboot — making it ideal for temporary scratch data that should not consume permanent storage.
- tmpfs is a RAM-backed file system; its files use memory (and swap), never permanent flash storage.
- Everything in tmpfs is volatile — it disappears on reboot or unmount, with no cleanup needed.
- Unlike on-disk temp files, tmpfs data never counts toward used device storage, so cleaners don't target it.
How tmpfs works
tmpfs is a Linux in-memory file system: a directory tree backed by the page cache rather than a block device. Reads and writes go straight to RAM, so it's extremely fast, and nothing is ever written to flash storage unless the kernel pushes idle pages out to swap under memory pressure. Because it's volatile, everything in a tmpfs mount is gone after a reboot or unmount.
It grows on demand — a tmpfs mount only uses as much memory as the files currently in it, up to a size limit, rather than reserving a fixed block. On Linux servers it commonly backs paths like /tmp, /run, and /dev/shm. On Android, which is Linux-based, tmpfs is used for various transient system mounts, giving the OS a place for short-lived data that shouldn't wear out or fill permanent storage.
tmpfs vs on-disk temp files
Both tmpfs and ordinary temp files hold throwaway data, but the storage cost is completely different. A file in a tmpfs mount occupies RAM and does not count toward your device's used storage; it cannot 'fill up the disk.' An on-disk temp file (for example in an app's cache or a Linux /var/tmp) sits on flash storage and does count against free space until something deletes it.
That difference drives where each is used. tmpfs suits data that is small, hot, and disposable — sockets, locks, intermediate build artifacts — where speed and auto-cleanup matter and persistence doesn't. Anything that must survive a reboot, or that could grow larger than available memory, belongs on a real disk-backed file system instead, because filling tmpfs consumes RAM the rest of the system needs.
Relevance to storage cleanup
Because tmpfs auto-clears on reboot and never consumes permanent storage, it is not something you can or should 'clean.' If a device feels low on memory rather than disk, a tmpfs mount may be holding pages, but the OS manages that and a restart empties it. Storage cleaners deal with the opposite problem: data that persists on flash.
The real space to reclaim is on-disk — app junk files, stale app cache, duplicate photos, and large videos that accumulate on flash storage and never disappear on their own. Cleanor targets that persistent data. tmpfs is a useful contrast: it shows that some 'temporary' data is free by design, while the temp data that actually eats your storage is the kind written to disk.