class Sprockets::Manifest

def clean(keep = 2)

keep the latest version plus 2 backups.
Cleanup old assets in the compile directory. By default it will
def clean(keep = 2)
  self.assets.keys.each do |logical_path|
    # Get assets sorted by ctime, newest first
    assets = backups_for(logical_path)
    # Keep the last N backups
    assets = assets[keep..-1] || []
    # Remove old assets
    assets.each { |path, _| remove(path) }
  end
end