def clean_vendor(name):
    """
    Ensure that vendored code/dirs are removed, possibly when packaging when
    the environment flag is set to avoid vendoring.
    """
    this_dir = path.dirname(path.abspath(__file__))
    vendor_dest = path.join(this_dir, 'ceph_deploy/lib/vendor/%s' % name)
    run(['rm', '-rf', vendor_dest])