#NEWLINE# def autoremove( jail = None , chroot = None , dryrun = False ) : #NEWLINE# #INDENT# "\n    Delete packages which were automatically installed as dependencies and are\n    not required anymore.\n\n    dryrun\n        Dry-run mode. The list of changes to packages is always printed,\n        but no changes are actually made.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n         salt '*' pkg.autoremove\n         salt '*' pkg.autoremove jail=<jail name or id>\n         salt '*' pkg.autoremove dryrun=True\n         salt '*' pkg.autoremove jail=<jail name or id> dryrun=True\n    " #NEWLINE# opts = '' #NEWLINE# if dryrun : #NEWLINE# #INDENT# opts += 'n' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# opts += 'y' #NEWLINE# #UNINDENT# cmd = _pkg ( jail , chroot ) #NEWLINE# cmd . append ( 'autoremove' ) #NEWLINE# if opts : #NEWLINE# #INDENT# cmd . append ( ( '-' + opts ) ) #NEWLINE# #UNINDENT# return __salt__ [ 'cmd.run' ] ( cmd , output_loglevel = 'trace' , python_shell = False )