How to prevent very big folder from /tmp/cargo-blah

Viewed 195

I tried to install a package with cargo cargo install wasm-pack

[uname@fedora yew-app]$ cargo install wasm-pack
    Updating crates.io index
  Installing wasm-pack v0.9.1
   Compiling libc v0.2.95
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
error: failed to write `/tmp/cargo-installpGQzlC/release/.fingerprint/libc-90a06805c5b45af7/invoked.timestamp`

Caused by:
  No space left on device (os error 28)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.9.1`, intermediate artifacts can be found at `/tmp/cargo-installpGQzlC`

It says that I don't have more space left, so I check my storage using df command and found out that my tmp folder is full caused by cargo.

[uname@fedora ~]$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
// ...other storage
tmpfs             967296  967296         0 100% /tmp
// ...other storage

enter image description here

This is tremendously big for just tmp files, how can I prevent this to happen in the future?

0 Answers
Related