#NEWLINE# def remove( self , pattern , src = None , build_ids = None , package_ids_filter = None , force = False ) : #NEWLINE# #INDENT# ' Remove local/remote conans, package folders, etc.\n        @param pattern: it could be OpenCV* or OpenCV\n        @param package_ids_filter: Lists with ids or empty for all. (Its a filter)\n        @param force: if True, it will be deleted without requesting anything\n        ' #NEWLINE# has_remote = self . _remote_proxy . _remote_name #NEWLINE# if has_remote : #NEWLINE# #INDENT# if ( ( build_ids is not None ) or src ) : #NEWLINE# #INDENT# raise ConanException ( "Remotes don't have 'build' or 'src' folder, just packages" ) #NEWLINE# #UNINDENT# search_info = self . _remote_proxy . search ( pattern ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# search_info = self . _file_manager . search ( pattern ) #NEWLINE# #UNINDENT# if ( not src ) : #NEWLINE# #INDENT# self . _user_io . out . warn ( ( 'No package recipe reference matches with %s pattern' % pattern ) ) #NEWLINE# return #NEWLINE# #UNINDENT# for conan_ref in search_info : #NEWLINE# #INDENT# if self . _ask_permission ( conan_ref , src , build_ids , package_ids_filter , force ) : #NEWLINE# #INDENT# if has_remote : #NEWLINE# #INDENT# if ( package_ids_filter is None ) : #NEWLINE# #INDENT# self . _remote_proxy . remove ( conan_ref ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _remote_proxy . remove_packages ( conan_ref , package_ids_filter ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# remover = DiskRemover ( self . _file_manager . paths ) #NEWLINE# if src : #NEWLINE# #INDENT# remover . remove_src ( conan_ref ) #NEWLINE# #UNINDENT# if ( build_ids is not None ) : #NEWLINE# #INDENT# remover . remove_builds ( conan_ref , build_ids ) #NEWLINE# #UNINDENT# if ( package_ids_filter is not None ) : #NEWLINE# #INDENT# remover . remove_packages ( conan_ref , package_ids_filter ) #NEWLINE# #UNINDENT# if ( ( not src ) and ( build_ids is None ) and ( package_ids_filter is None ) ) : #NEWLINE# #INDENT# remover . remove ( conan_ref ) #NEWLINE# registry = self . _remote_proxy . registry #NEWLINE# registry . remove_ref ( conan_ref , quiet = True ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not has_remote ) : #NEWLINE# #INDENT# delete_empty_dirs ( self . _file_manager . paths . store )