Search Unity

UnitySetup leaves garbage in /tmp

Discussion in 'Linux' started by spacepluk, Oct 5, 2017.

  1. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    While testing the Arch Linux packages I've been running UnitySetup quite a lot.

    I've noticed that some temporary files are being left in `/tmp/.Trash-0` and at least on my system (Gnome) emptying the trash doesn't get rid of them. So you need to delete them manually with `rm -r /tmp/.Trash-0` or you end up wasting a few Gb of ram until the next reboot.
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    It's using g_file_trash.
    It looks like this can result in undesired behavior when /tmp is on a different volume than the "main" trash.
    I see a bit of internet argument about whose fault this is and how(/whether) it should be fixed.
     
  3. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    Yeah, it makes sense that it works like that but I think it's more common for /tmp to be a separate tmpfs volume. I would just use g_file_delete.