# How to overwrite policyfile.lock.json runlist

**URL:** <https://discourse.chef.io/t/how-to-overwrite-policyfile-lock-json-runlist/20920>\
**Category:** Chef Infra (archive)\
**Created:** [March 31, 2022, 2:41pm UTC](https://discourse.chef.io/t/how-to-overwrite-policyfile-lock-json-runlist/20920 "2022-03-31T14:41:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nichef](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@Nichef](https://discourse.chef.io/u/Nichef)\
**Post date:** [March 31, 2022, 2:41pm UTC](https://discourse.chef.io/t/how-to-overwrite-policyfile-lock-json-runlist/20920/1 "2022-03-31T14:41:38Z")

</div>

Good Day

Can a policyfile/policyfile.lock.json runlist be overwritten, similar than cookbooks? Will appreciate if someone can advise how to go about.

Tried the below to overwrite default recipe, without success:

Option 1) _knife node run\_lists set node 'recipe[mycookbook::myrecipe]'_  
When running chef-client on the node it still runs the policyfile.lock.json original compiled runlist

Option 2) _chef-client -o "recipe[mycookbook::myrecipe]'"_  
Returns error, Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support override run lists. Use named run\_lists instead

Thanks  
Nic
