question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cleaning up tmp directory throws an error

See original GitHub issue

The error is

Error: ENOTEMPTY: directory not empty, rmdir '/tmp/tmp-96377PyPfMXvxq0t'

and it’s pretty obvious what it’s complaining about. I wrote to the temporary directory and now it doesn’t want to clean it up because something is inside. In rm terms, I should use -f.

The problem I have with this is that there’s probably always something inside this temporary directory. Shouldn’t the library clean this up regardless?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
raszicommented, Jul 21, 2016
tmp.dirSync({ unsafeCleanup: true });
0reactions
nicolas-raoulcommented, Jul 21, 2016

Stupid question: How to use the options? tmp.dirSync("unsafeCleanup"); does not work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically Cleaning Up Temporary Files on Program Exit
A dead-simple way to clean up temporary files without having to worry ... It makes use of my Throw() method to easily raise...
Read more >
AWS lambda - Release /tmp storage after each execution
At the beginning of function, I wrote some code to the clean up /tmp folder, to make sure it's not out of memory...
Read more >
How to Delete Temporary Files in Windows
Enter %temp% from Search/Run, and delete what's in there. Also empty the Recycle Bin. Alternatively, use a command line command.
Read more >
Failed to delete temp file - how to solve related issues
A delete request throws 404 error code if the document does not already exist in the index. If you want to delete a...
Read more >
Failed to delete temp folder - SonarCloud
At what point is the error thrown? What logs came before it? SonarQube Developer Editions fails to create a temp directory.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found