
    si*                     |    S r SSKrSSKJrJrJr  SSKJr  \R                  " \	5      r
S\S\4S jrS	\S
\S\4S jrg)zeCLI implementation for `conda remove`.

Removes the specified packages from an existing environment.
    N)ArgumentParser	Namespace_SubParsersAction   )
confirm_ynsub_parsersreturnc                 j   SSK Jn  SSKJn  SSKJn  SSKJnJnJ	nJ
nJn	Jn
JnJn  SnU" SU S	35      nU" S
5      nU R                  "  S*UUUS.UD6nU" U5        U" U5        U	" U5        U" U5        UR!                  S5      nUR#                  SSSS9  UR#                  SSSSSS9  UR#                  SSSUSS9  U
" U5        U" U5        U" U5        U" U5        UR#                  SSSS9  UR#                  SSSS9  UR#                  SSS S!S"S#9  UR#                  S$US%S&US'9  UR%                  S(S)9  U$ )+Nr   )dals)NULL   )NullCountAction)add_output_and_prompt_optionsadd_parser_channelsadd_parser_frozen_envadd_parser_networkingadd_parser_prefixadd_parser_pruneadd_parser_pscheckadd_parser_solverz>Remove a list of packages from a specified conda environment. z	
        a  

        Use `--all` flag to remove all packages and the environment itself.

        This command will also remove any package that depends on any of the
        specified packages as well---unless a replacement can be found without
        that dependency. If you wish to skip this dependency checking and remove
        just the requested packages, add the '--force' option. Note however that
        this may result in a broken environment, so use this with caution.
        a  
        Examples:

        Remove the package 'scipy' from the currently-active environment::

            conda remove scipy

        Remove a list of packages from an environment 'myenv'::

            conda remove -n myenv scipy curl wheel

        Remove all packages from environment `myenv` and the environment itself::

            conda remove -n myenv --all

        Remove all packages from the environment `myenv` but retain the environment::

            conda remove -n myenv --all --keep-env

        )helpdescriptionepilogzSolver Mode Modifiersz
--features
store_truez&Remove features (instead of packages).)actionr   z--force-removez--forcezForces removal of a package without removing packages that depend on it. Using this option will usually leave your environment in a broken and inconsistent state.force_remove)r   r   destz--no-pinignore_pinnedzIgnore pinned package(s) that apply to the current operation. These pinned packages might come from a .condarc file or a file in <TARGET_ENVIRONMENT>/conda-meta/pinned.)r   r   defaultr   z--allz2Remove all packages, i.e., the entire environment.z
--keep-envz@Used with `--all`, delete all packages but keep the environment.package_namespackage_namestore*z-Package names to remove from the environment.)metavarr   nargsr   z--devzUse `sys.executable -m conda` in wrapper scripts instead of CONDA_EXE. This is mainly for use during tests where we test new conda sources against old Python versions.dev)r   r   r   r   zconda.cli.main_remove.execute)func)remove)
auxlib.ishr   common.constantsr   actionsr   helpersr   r   r   r   r   r   r   r   
add_parseradd_argument_groupadd_argumentset_defaults)r   kwargsr   r   r   r   r   r   r   r   r   r   r   summaryr   r   psolver_mode_optionss                     5lib/python3.13/site-packages/conda/cli/main_remove.pyconfigure_parserr6      s   !'(	 	 	 OG			 		
	K 	F. 				
 	A !qa../FG$$5 % 
 $$  %  $$2 %  ())*!!!$NNA  
 NNO  
 NN<   NN'    NN7N8H    argsparserc           	        ^ SSK Jn  SSKJn  SSKJnJn  SSKJn  SSK	J
nJnJn	Jn
  SSKJnJn  SSKJm  S	S
KJnJn  S	SKJn  U R0                  (       d  U R2                  (       d  U	" S5      eUR5                  5       nUR7                  5         UR8                  (       a  UR;                  5         U" 5         [=        UR>                  5      nU R0                  (       a   UU" UR@                  5      :X  a
  SnU" U5      eU R0                  (       a  UU" URB                  5      :X  a  U" S5      eU R0                  (       a  U" U5      (       a  gU R0                  (       a  URE                  5       (       a  U" S5      eU RF                  (       d  [I        SU S35        SU ;   a=  U" U[K        U" U5      RM                  5       5      SSS0 S9nU" U5      n U" UUU SS5        URN                  (       dA  U RP                  (       d0  U RF                  (       d  [S        SU S3SSS9  U" U5        U" U5        gU RT                  (       a)  [K        U4S j[W        U R2                  5       5       5      nOU" U R2                  5      nSnSnURX                  R[                  5       nU" UUUUS9nUR]                  5       nU" UUU SS5        g! U
 a$    U RF                  (       d  [I        SU S35         GNf = f) Nr   )context)unregister_env)PrefixSetupUnlinkLinkTransaction)
PrefixData)CondaEnvExceptionCondaEnvironmentErrorCondaValueErrorPackagesNotFoundError)path_is_cleanrm_rf)	MatchSpecr   )check_non_adminspecs_from_args)
handle_txnzHno package names supplied,
       try "conda remove -h" for more detailszHCannot remove current environment. Deactivate and run conda remove againzMCannot remove an environment if it is configured as `default_activation_env`.r   z?cannot remove root environment, add -n NAME or -p PREFIX optionz$
Remove all packages in environment z:
r     )target_prefixunlink_precs
link_precsremove_specsupdate_specsneutered_specsFTzNo packages found in z . Continuing environment removalz)Everything found within the environment (zu), including any conda environment configurations and any non-conda files, will be deleted. Do you wish to continue?
no)r   dry_runc              3   0   >#    U  H  nT" US 9v   M     g7f))track_featuresNrJ   ).0frF   s     r5   	<genexpr>execute.<locals>.<genexpr>   s     W?V!)15?Vs   )specs_to_remove)/base.contextr;   core.envs_managerr<   	core.linkr=   r>   core.prefix_datar?   
exceptionsr@   rA   rB   rC   gateways.disk.deleterD   rE   models.match_specrF   commonrG   rH   installrI   allr    from_contextassert_environmentprotect_frozen_envsassert_not_frozenstrprefix_pathdefault_prefixdefault_activation_prefixis_basejsonprinttupleiter_recordsrR   keep_envr   featuressetplugin_managerget_cached_solver_backendsolve_for_transaction)r8   r9   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rG   rH   rI   prefix_dataprefixmsgstptxnspecschannel_urlssubdirssolver_backendsolverrF   s                             @r5   executer      s   &2>-  <-8#HH**W
 	
 ))+K""$""%%'(()FxxK:g.D.D#EEX#C((xxK:g.O.O#PP[
 	
 xxM&))xx  'Q  yy9&EFd"$":f#5#B#B#DE!C (,C3eT: ==yyCF8 LA A !% % fv& ==Ws4CUCU?VWWE#D$6$67E //IIKguU**,3eT2? ) yy/x7WXs   J> >&K('K()__doc__loggingargparser   r   r   	reportersr   	getLogger__name__logr6   intr   rJ   r7   r5   <module>r      s^   
  A A "!|"3 |. |~[) [^ [ [r7   