The issue at hand: My /var/tmp folder is stacking up on literary hundreds of folders called "container_images_storage_xxxxxxxxxx", where the x’s present a random number. Each folder contains the following files called 1, 2 and 3 as seen in thumbnail. Each folder seems to increase in size too, as the lowest I can see is the size of 142.2 MiB, but the highest 2.1GB. This is a problem as it is taking up all my disk space, and even if I do delete them, they come back the next day… I believe this has something to do with podman, but I’m really not quite sure. All I use the PC for is browsing and gaming.

Is there a way to figure out where a file or folder is coming from on Linux? I’ve tried stat and file, but neither gave me any worthwhile information AFAIK. Would really appreciate some help to figure what causes this, I am still new to the Linux desktop and have no idea what is causing this issue. I am on atomic desktop, using Bazzite:latest.

stat:

stat 1
  File: 1
  Size: 1944283388	Blocks: 3797432    IO Block: 4096   regular file
Device: 0,74	Inode: 10938462619658088921  Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/    buzz)   Gid: ( 1000/    buzz)
Context: system_u:object_r:fusefs_t:s0
Access: 2024-05-06 12:18:37.444074823 +0200
Modify: 2024-05-06 12:22:51.026500682 +0200
Change: 2024-05-06 12:22:51.026500682 +0200
 Birth: -

file

file 1
1: gzip compressed data, original size modulo 2^32 2426514442 gzip compressed data, reserved method, ASCII, extra field, encrypted, from FAT filesystem (MS-DOS, OS/2, NT), original size modulo 2^32 2426514442
    • Sunny' 🌻@slrpnk.netOP
      link
      fedilink
      arrow-up
      15
      arrow-down
      1
      ·
      edit-2
      7 months ago

      ouh, nice find! when I do podman info i do fine one line that says

      imageCopyTmpDir: /var/tmp

      so this must be it? I have had one distrobox set up using boxbuddy, could that be it?

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        18
        ·
        7 months ago

        Give this a go:

        podman system prune
        

        See if it frees up any space. But it does seem like you’re running containers (which makes sense given you’re on an immutable distro) so I would expect to be using lots of temporary space for container images.

        • Sunny' 🌻@slrpnk.netOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          7 months ago

          right so podman system prune does save some space, but not much. I still see the folders popping in right after having used the command. Also podman ps --all doesnt list a single container :<

          • atzanteol@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            3
            ·
            7 months ago

            My guess is that you’re using some other form of containers then, there are several. It’s a common practice with immutable distros though I don’t know much about bazzite itself.

            Are these files large? Are they causing a problem? Growing without end? Or just “sitting there” and you’re wondering why?

            • Sunny' 🌻@slrpnk.netOP
              link
              fedilink
              arrow-up
              2
              ·
              7 months ago

              Growing without and end, each file varies in size, one being bigger than the other, as I wrote in the description of the post. They will continue to stack up until it fills my entire 1TB SSD, then KDE will complain i have no storage left.

              I dont have docker installed and Podman ps --all says I have no containers… So im kind of lost at sea with this one.

              • atzanteol@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                3
                ·
                7 months ago

                Those aren’t the only containers. It could be containrd, lxc, etc.

                One thing that might help track it down could be running sudo lsof | grep '/var/tmp'. If any of those files are currently opened it should list the process that hold the file handle.

                “lsof” is “list open files”. Run without parameters it just lists everything.

                • Sunny' 🌻@slrpnk.netOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  7 months ago

                  Thanks for helping out! the command u gave me, plus opening one of the files gives the following output, I dont really know what to make of it;

                  buzz@fedora:~$ sudo lsof | grep '/var/tmp/'
                  lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
                        Output information may be incomplete.
                  podman    10445                            buzz   15w      REG               0,41   867465454    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10446 podman               buzz   15w      REG               0,41   867399918    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10447 podman               buzz   15w      REG               0,41   867399918    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10448 podman               buzz   15w      REG               0,41   867399918    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10449 podman               buzz   15w      REG               0,41   867399918    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10450 podman               buzz   15w      REG               0,41   867416302    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10451 podman               buzz   15w      REG               0,41   867416302    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10452 podman               buzz   15w      REG               0,41   867416302    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10453 podman               buzz   15w      REG               0,41   867432686    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10454 podman               buzz   15w      REG               0,41   867432686    2315172 /var/tmp/container_images_storage1375523811/1
                  podman    10445 10455 podman               buzz   15w      REG               0,41   867432686    2315172 /var/tmp/container_images_storage1375523811/1
                  
                  continues...
                  
  • Rustmilian@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    2
    ·
    edit-2
    7 months ago

    In any case, it’s the temporary file directory so it should be fine to delete them manually.
    Just make sure that podman isn’t running while you’re deleting them, assuming it is podman.

    • Sunny' 🌻@slrpnk.netOP
      link
      fedilink
      arrow-up
      7
      ·
      7 months ago

      which is what I am doing, but its constantly being refilled… i delete them now, and they’re back again tomorrow…

      • FigMcLargeHuge@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        edit-2
        7 months ago

        Set up a cron job to run every hour that deletes them if they are older than 60 mins. Eg:
        0 * * * * find /var/tmp -type d -mmin +60 -exec rm -rf {} ;

  • db2@lemmy.world
    link
    fedilink
    arrow-up
    11
    arrow-down
    3
    ·
    7 months ago

    If you have enough ram you could make /var/tmp a ramdisk, every reboot will clear it then.

      • boredsquirrel@slrpnk.net
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        7 months ago

        Do you have any containers? Do you use homebrew?

        Please report this to ublue as if this is an actual problem, it might be important.

        • Sunny' 🌻@slrpnk.netOP
          link
          fedilink
          arrow-up
          2
          ·
          7 months ago

          I do not have any containers afaik, docker is not installed and podman ps --all gives zero results. I do use hombrew a little, have the following installed;

          $ brew list
          berkeley-db@5  exiftool  expat	gdbm  libxcrypt  perl  uchardet
          

          I have reported this over a week ago, in their help section, but have not gotten a lot of help with it, even though I have tried to document the process as much as possible. If I dont get any more help there, I’ll try to report it to the appropriate ublue channels.

            • Sunny' 🌻@slrpnk.netOP
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              7 months ago

              might well be, I had one Fedora box through toolbox, but deleted that. But they still appear, so thats ruled out too. I dont use homebrew that much, so I could try to remove it to see if that changes anything.

              Also, Podman --help states that ps is to list containers:

              ps List containers

              I have removed all containers and images prior to this as I thought that was the issue, but it seems like it is not.