How does Manjaro manage temporary files?

I see /etc/tmpfiles.d/ where a systemd tmp files handling could be configured is empty.

Only in memory exists a tempfs in folder /tmp … there a lots of files which don’t survive next boot.

Are there more configurations for handling temporary files in Manajroa?

Generated on 2022-01-24 18:15:1643044505

#################### inxi -Fxzc0 ########################

  Kernel: 5.15.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: Xfce 4.16.0
    Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: LENOVO product: 81RS v: Lenovo Yoga S740-14IIL serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <superuser required> UEFI: LENOVO
    v: BYCN39WW date: 05/28/2021
  ID-1: BAT0 charge: 62.6 Wh (95.9%) condition: 65.3/62.0 Wh (105.3%) volts: 17.0 min: 15.4
    model: LGC L19L4PD2 status: Full
  Info: quad core model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake rev: 5 cache:
    L1: 320 KiB L2: 2 MiB L3: 8 MiB
  Speed (MHz): avg: 1214 high: 1300 min/max: 400/3900 cores: 1: 1300 2: 1200 3: 1200 4: 1210
    5: 1200 6: 1201 7: 1201 8: 1200 bogomips: 23968
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Device-1: Intel Iris Plus Graphics G7 vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0
  Device-2: NVIDIA GP108M [GeForce MX250] vendor: Lenovo driver: nvidia v: 495.46
    bus-ID: 2b:00.0
  Device-3: Chicony Integrated Camera type: USB driver: uvcvideo bus-ID: 3-5:3
  Display: x11 server: X.Org driver: loaded: modesetting,nvidia unloaded: nouveau
    resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  Message: Unable to show advanced data. Required tool glxinfo missing.
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Lenovo driver: sof-audio-pci-intel-icl
    bus-ID: 00:1f.3
  Sound Server-1: ALSA v: k5.15.16-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.20 running: no
  Sound Server-4: PulseAudio v: 15.0 running: no
  Sound Server-5: PipeWire v: 0.3.43 running: yes
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152 bus-ID: 2-1.4:3
  IF: enp0s13f0u1u4 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: pan1 state: down mac: <filter>
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-10:5
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
  Local Storage: total: 1.86 TiB used: 341.95 GiB (18.0%)
  ID-1: /dev/nvme0n1 vendor: Micron model: MTFDHBA1T0TCK size: 953.87 GiB temp: 36.9 C
  ID-2: /dev/sda type: USB vendor: Kingston model: DataTraveler 2.0 size: 14.54 GiB
  ID-3: /dev/sdb type: USB vendor: Western Digital model: WD10EARX-00N0YB0 size: 931.51 GiB
  ID-1: / size: 57.9 GiB used: 35.35 GiB (61.0%) fs: ext4 dev: /dev/nvme0n1p8
  ID-2: /boot/efi size: 259.5 MiB used: 114.1 MiB (44.0%) fs: vfat dev: /dev/nvme0n1p1
  ID-1: swap-1 type: partition size: 16.67 GiB used: 0 KiB (0.0%) dev: /dev/nvme0n1p9
  System Temperatures: cpu: 47.0 C mobo: N/A
  Fan Speeds (RPM): N/A
  Processes: 307 Uptime: 4h 47m Memory: 15.2 GiB used: 3.06 GiB (20.1%) Init: systemd Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: 1756 Client: Unknown Client: wrapper-2.0 inxi: 3.3.12

Just an idea: look in journalctl for matching messages … i’ll do after posting that !

1 Like

You pretty much nailed it it seems.

I also asked because i want to “discipline” Spotify that consumes my HD free space without any worry … chenged Spotify cache to use /tmp folder and now i’ll see what happens!

By default, with no configuration, TMPFS is using RAM, mounted to /tmp and should be wiped on reboot.
You can configure this to work differently … but you probably dont want to.

Spotify does not respect my /tmp settings for its cache :frowning:

What if you get hacky with it and use whatever home directory it likes … and make that symlink to a directory in tmpfs ?
Sometimes you gotta get tricky with the proprietary demons. daemons? gremlins?

Yes, i know this settings but it seems to be ignored if you use a snap version of spotify :frowning:

I changed to snap version because there were update trouble with the package version of spotify.
Now i have a login script to clear that Data directory … we’ll see what happens now!

seems to work:

#! /bin/sh
rm -r  /home/$USER/snap/spotify/common/.cache/spotify/Data/*