def remove_extra_packages(self, packages, dry_run=False):
removal_list = self.determine_extra_packages(packages)<EOL>if not removal_list:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>if dry_run:<EOL><INDENT>print("<STR_LIT>" %<EOL>"<STR_LIT>".join(removal_list))<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>args = [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>args.extend(list(removal_list))<EOL>subprocess.check_call(args)<EOL><DEDENT><DEDENT>
Remove all packages missing from list