Temp files on OSX

While debugging , I created some files in SpecialFolder.Temporary but I wanted to see where they went

I found the path was
Macintosh HD:private:var:folders:_w:q35jmt9n7hl5jw93vxj8qv3h0000gn:T:TemporaryItems:

Thats fine.
But I notice that there are thousands of files in this vicinity, some are 10 years old or more.
Is there anything that will remove these old temp files safely?
eg something like CleanMyMac but with a good reputation?

or is it just a case of ‘select all’ and drag to the trash?

I note that some sub folders contain ‘delete at startup’ folders , which sounds like a great idea except that many of THOSE arent empty, so something isnt doing what it says on the tin…

Normally, the Temp directory is emptied upon system restart.

Really ?

Get an eye on your own Trash can… before sending wrong answers.

Mac OS X put these into the Trash, leaving to the user at reboot time to deal with it.

Xojo (2015r1, never bother to check earlier versions), when you use the off line LR put some temp files (in a folder) in the Trash.

Clearly neither happening for me.
Ive restarted many times since 2006, and my Trash is empty.

/tmp is cleared.
The other temp folders are not cleaned.
macOS 10.12 adds some new cleanup assistant which may clean it up.

That sounds like a niche market for a small cleaning app…

“Storage Management”
Cleared quite a bit of stuff, although it offers to remove Garageband sound library of 3.51 Gb but doesnt succeed.
Strangely no option for temp files though.

That’s good. I also checked in the MAS. “Temporary files” leads to no result.

It means there probably is room for a small utility that does house cleaning.

Are you sure the sandbox allows access to those folders?

You are right. No. So that would have to be a non-MAS app.

It’s not really a user serviceable directory, which is why it’s not easy to get to.
If you are going to trash the contents, I would recommend right before a shutdown or restart to avoid causing issues with currently running applications.

[quote=324136:@Jeff Tullin]I found the path was
Macintosh HD:private:var:folders:_w:q35jmt9n7hl5jw93vxj8qv3h0000gn:T:TemporaryItems:[/quote]

I just checked on my machine. I looked into specialfolder.temporary. There are three folders, and one file none ancient (a folder contains Xojo scratch files from today).

Something must have happened on your machine that did not timely dispose of the file it was supposed to delete at restart.

I would simply drag them to the trash and see what happens. It is possible some files be busy, but then they will simply not delete right away, but after restart.

I did the same thing as Michel did, and found ONE file from 2013, and two files from today

Does your have the same kind of formation?

Macintosh HD:private:var:

[quote=324198:@Jeff Tullin]Does your have the same kind of formation?

Macintosh HD:private:var:[/quote]

even wrote a small Xojo program to peruse specialfolder.temporary
and no files were more than one day old

I have files going back halfway through last year.
(that must be the last time I manually trashed it manually)

In Mac OS X early days, there was MacJanitor.