dsp_099
dsp_099

Reputation: 6121

Can the rails tmp/cache/assets files be safely deleted?

I seem to have a TON of them in subfolders named for example

sprockets%2F76920e6913c3390459175ac8e6dfd44a3

They seem to contain binary data.

What are they for, why are there so many of them and most importantly, can these be safely removed? They take forever to scp.

Upvotes: 30

Views: 9577

Answers (3)

Sibevin Wang
Sibevin Wang

Reputation: 4538

There is a rake task for clearing tmp:

rails tmp:clear

Upvotes: 1

Guy Dubrovski
Guy Dubrovski

Reputation: 1560

Yes, you can safely delete it.

The best way to delete will be running the following in the rails console:

Rails.cache.clear

Upvotes: 4

Eric Wood
Eric Wood

Reputation: 446

Yep! You can delete the whole tmp directory and it will get recreated.

Upvotes: 38

Related Questions