Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The cleanup cookbook has been deprecated

Author provided reason for deprecation:

The cleanup cookbook has been deprecated and is no longer being maintained by its authors. Use of the cleanup cookbook is no longer recommended.


cleanup (4) Versions 0.0.1

Installs/Configures cleanup

cookbook 'cleanup', '= 0.0.1', :supermarket
cookbook 'cleanup', '= 0.0.1'
knife supermarket install cleanup
knife supermarket download cleanup
Quality 0%


This cookbook creates a cleanup resource to handle the cleanup of arbitrary paths based on number of files or last modified dates.


  • name - String representing a path glob so wildcards are totally fine.
  • dry_run - true/false Defaults to false. If true will disable actual file operations.`
  • files - true/false Defaults to true. If false will ignore files during cleanup.
  • directories - true/false Defaults to true. If false will ignore directories during cleanup.

keep_last and older_than are mutally exclusive since I can't think of any way combining them makes sense.

  • keep_last - Takes an integer. Will keep that many files starting from the most recent.
  • older_than - Takes a hash that looks like {:time_increment => time_quantity}. Increments can be one of [:minutes, :hours, :days, :weeks] (months are hard).


Include the cookbook then just call the cleanup resource from your recipe like this:

Keep the most recent 5 files

cleanup "/your/path/here/*" do
  keep_last 5

Delete files older than 1 week

cleanup "/your/path/here/*" do
  older_than :weeks => 1

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Foodcritic Metric

0.0.1 failed this metric

FC017: LWRP does not notify when updated: /tmp/cook/99720cce8c69c3bce095eb95/cleanup/providers/default.rb:11