Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Default tmp directory is in HOME #2936

pksunkara opened this Issue · 6 comments

6 participants


Is that intentional?

How can I change it?


npm help config

The default tmp dir is /tmp. The default cache dir is ~/.npm, which is not a "temp" dir, though it is fine to delete stuff out of there. More properly, it's a cache.

Set the tmp dir via the tmp npm config. Set the cache dir via the cache npm config.

@isaacs isaacs closed this

In Ubuntu, The default tmp dir is $HOME/tmp not /tmp


Thanks for confirming what I suspected pksunkara. Indeed, the Ubuntu package has the default as $HOME/tmp


Ah, right, well... if the OS sets TMP or TMPDIR environments, npm dutifully does as its told.


How can I ask npm to use ~/.tmp rather than ~/tmp in ubuntu?


Fairly certain it's the npm config set tmp / npm config get tmp commands.

You can get more info by doing npm help config.

@othiym23 othiym23 added the support label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.