<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune(force):
 """Remove all configuration for environments."""

    if not force:
        echo_warning(
            'Removing configuration of environments that may be in use will leave '
            'them in a potentially unusable state. If you wish to proceed (e.g. you '
            'have just restarted your machine), you may use the -f / --force flag.'
        )
        abort(code=2)

    checks = get_configured_checks()
    for check in checks:
        envs = get_configured_envs(check)

        if envs:
            echo_info('{}:'.format(check))
            for env in envs:
                echo_waiting('Removing `{}`... '.format(env), nl=False, indent=True)
                remove_env_data(check, env)
                echo_success('success!')

        remove_env_root(check)