<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean(ctx, state, dry_run=False, bare=False, user=False):
 """Uninstalls all packages not specified in Pipfile.lock."""

    from ..core import do_clean
    do_clean(ctx=ctx, three=state.three, python=state.python, dry_run=dry_run,
             system=state.system)