# Why does 'chef-client -o' trash my locally cached cookbooks?

**URL:** <https://discourse.chef.io/t/why-does-chef-client-o-trash-my-locally-cached-cookbooks/6495>\
**Category:** Chef Infra (archive)\
**Created:** [April 17, 2015, 8:40pm UTC](https://discourse.chef.io/t/why-does-chef-client-o-trash-my-locally-cached-cookbooks/6495 "2015-04-17T20:40:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Blaine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeff_blaine/32/19_2.png) [@Jeff\_Blaine](https://discourse.chef.io/u/Jeff_Blaine)\
**Post date:** [April 17, 2015, 8:40pm UTC](https://discourse.chef.io/t/why-does-chef-client-o-trash-my-locally-cached-cookbooks/6495/1 "2015-04-17T20:40:32Z")

</div>

Maybe this is different in later versions, we’re on 11.18, but is there  
a reason for “override my run list this one time” to nuke all of the  
locally cached cookbooks that do not match that new one-time run list?

---

<div class="post-metadata">

**Author:** ![Ranjib](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ranjib/32/1040_2.png) [@Ranjib](https://discourse.chef.io/u/Ranjib)\
**Post date:** [April 17, 2015, 10:59pm UTC](https://discourse.chef.io/t/why-does-chef-client-o-trash-my-locally-cached-cookbooks/6495/2 "2015-04-17T22:59:24Z")

</div>

this how its designed/implemented currently. the cookbook sync step before  
the chef run will ensure only the cookbooks defined in run list exist in  
the cache folder, rest is nuked. Try using a different folder as  
file\_cache\_path when using -o to override the run list.

On Fri, Apr 17, 2015 at 1:40 PM, Jeff Blaine [jblaine@kickflop.net](mailto:jblaine@kickflop.net) wrote:

> Maybe this is different in later versions, we're on 11.18, but is there  
> a reason for "override my run list this one time" to nuke all of the  
> locally cached cookbooks that do not match that new one-time run list?

---

<div class="post-metadata">

**Author:** ![Jeff\_Blaine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeff_blaine/32/19_2.png) [@Jeff\_Blaine](https://discourse.chef.io/u/Jeff_Blaine)\
**Post date:** [April 20, 2015, 1:22pm UTC](https://discourse.chef.io/t/why-does-chef-client-o-trash-my-locally-cached-cookbooks/6495/3 "2015-04-20T13:22:37Z")

</div>

On 4/17/2015 6:59 PM, Ranjib Dey wrote:

> this how its designed/implemented currently. the cookbook sync step  
> before the chef run will ensure only the cookbooks defined in run list  
> exist in the cache folder, rest is nuked. Try using a different folder  
> as file\_cache\_path when using -o to override the run list.

Hi Ranjib,

Well, yeah, clearly that's how it's implemented currently 😉

My question was why? Is there a real reason to trash them?

> On Fri, Apr 17, 2015 at 1:40 PM, Jeff Blaine \<[jblaine@kickflop.net](mailto:jblaine@kickflop.net)  
> [mailto:jblaine@kickflop.net](mailto:jblaine@kickflop.net)\> wrote:
> 
> ```
> Maybe this is different in later versions, we're on 11.18, but is there
> a reason for "override my run list this one time" to nuke all of the
> locally cached cookbooks that do not match that new one-time run list?
> 
> ```

---

<div class="post-metadata">

**Author:** ![Lamont\_Granquist](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@Lamont\_Granquist](https://discourse.chef.io/u/Lamont_Granquist)\
**Post date:** [April 21, 2015, 7:52am UTC](https://discourse.chef.io/t/why-does-chef-client-o-trash-my-locally-cached-cookbooks/6495/4 "2015-04-21T07:52:16Z")

</div>

On 4/20/15 6:22 AM, Jeff Blaine wrote:

> On 4/17/2015 6:59 PM, Ranjib Dey wrote:
> 
> > this how its designed/implemented currently. the cookbook sync step  
> > before the chef run will ensure only the cookbooks defined in run list  
> > exist in the cache folder, rest is nuked. Try using a different folder  
> > as file\_cache\_path when using -o to override the run list.  
> > Hi Ranjib,
> 
> Well, yeah, clearly that's how it's implemented currently 😉
> 
> My question was why? Is there a real reason to trash them?  
> In Chef 12 it doesn't.
> 
> > On Fri, Apr 17, 2015 at 1:40 PM, Jeff Blaine \<[jblaine@kickflop.net](mailto:jblaine@kickflop.net)  
> > [mailto:jblaine@kickflop.net](mailto:jblaine@kickflop.net)\> wrote:
> > 
> > ```
> > Maybe this is different in later versions, we're on 11.18, but is there
> > a reason for "override my run list this one time" to nuke all of the
> > locally cached cookbooks that do not match that new one-time run list?
> > 
> > ```
