# Housekeeping



## balanga (Apr 2, 2019)

I'm interested in how people tackle housekeeping, ie removing temporary  or  *.core files among others...

I have a ton of  .org.chromium.Chromium.* files in tmp among other files and don't know how long Chromium actually uses them. There are also numerous  gvfs* and ssh.* files that appear frequently. Is there a list of common temporary files that should be deleted?


----------



## SirDice (Apr 2, 2019)

Technically, they're temporary files and can all be deleted. That's the nature of temporary files. 

Have a look at 100-clean-disks and 110-clean-tmps from periodic(8).


----------



## D-FENS (Apr 2, 2019)

`sysrc clear_tmp_enable="YES"`
On reboot /tmp is cleared automatically. Do NOT do it in /var/tmp though. As per documentation /var/tmp contains files that should survive a reboot.

And an even nicer solution if you have enough RAM, put /tmp on a ramdisk: 

```
% cat /etc/fstab                                                                                                                                                                                                                                                                                  :(
# Device                Mountpoint              FStype          Options                                                      Dump Pass#

# RAMDISK tmp's
tmpfs                   /tmp                    tmpfs           size=16G,rw,mode=01777                                          0 0
tmpfs                   /usr/obj                tmpfs           size=16G,rw,mode=01777                                          0 0
```


----------



## SirDice (Apr 2, 2019)

roccobaroccoSC said:


> On reboot /tmp is cleared automatically.


If balanga is like me he's not rebooting often. In that case /tmp and /var/tmp can collect a whole slew of left-over temp files over time. The periodic(8) scripts are useful as they run daily and help clean up old stuff.


----------

