def clean():
    # Put site into maintenance
    maintenance_on()

    # Drop Database
    db_drop()

    # Create Empty Database
    db_create()

    # Delete compiled folder
    with cd("/home/web2py/applications/eden/"):
        # Remove compiled version of the app
        run("/bin/rm -rf compiled", pty=True)

    # Delete sessions
    with cd("/home/web2py/applications/eden/"):
        # Remove compiled version of the app
        run("/bin/rm -rf sessions/*", pty=True)

    # Enable migration
    migrate_on()

    # Enable Prepopulate
    with cd("/home/web2py/applications/eden/"):
        print(green("%s: Enabling prepopulate" % env.host))
        run("sed -i 's/deployment_settings.base.prepopulate = False/deployment_settings.base.prepopulate = 1/' models/000_config.py", pty=True)

    # Migrate
    migrate()

    # Disable Prepopulate
    with cd("/home/web2py/applications/eden/"):
        print(green("%s: Disabling prepopulate" % env.host))
        run("sed -i 's/deployment_settings.base.prepopulate = True/deployment_settings.base.prepopulate = 0/' models/000_config.py", pty=True)

    # Disable migration
    migrate_off()

    # Optimise
    optimise()

    # Init script (if present)
    print(green("%s: Init Script" % env.host))
    with cd("/home/web2py"):
        try:
            run("sudo -H -u web2py python web2py.py -N -S eden -M -R init.py", pty=True)
        except:
            pass

    # Take site out of maintenance
    maintenance_off()
Creates a BenchmarkSpec or loads one from a file.
dataset/ETHPy150Open sahana/eden/static/scripts/tools/fabfile.py/clean--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/pkb.py/_GetBenchmarkSpec