
    <Bh5                     |    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           	      p  ^ 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	  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 R.                  (       d  U R0                  (       d  U" S5      eUR3                  5       nUR5                  5         UR6                  (       a  UR9                  5         U" 5         [;        UR<                  5      nU R.                  (       a  X" UR>                  5      :X  a
  SnU" U5      eU R.                  (       a  U
" U5      (       a  gU R.                  (       a  URA                  5       (       a  U" S5      eU RB                  (       d  [E        SU S35        SU ;   a=  U" U[G        U" U5      RI                  5       5      SSS0 S9nU" U5      n U" UUU SS5        URJ                  (       dA  U RL                  (       d0  U RB                  (       d  [O        SU S3SSS9  U" U5        U" U5        gU RP                  (       a(  [G        U4S j[S        U R0                  5      5       5      nOU" U R0                  5      nSnSnURT                  RW                  5       nU" UUUUS9nURY                  5       nU" UUU SS5        g! U	 a$    U RB                  (       d  [E        SU S35         GNf = f)Nr   )context)unregister_env)PrefixSetupUnlinkLinkTransaction)
PrefixData)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 againr   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_featuresNrI   ).0frE   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   gateways.disk.deleterC   rD   models.match_specrE   commonrF   rG   installrH   allr    from_contextassert_environmentprotect_frozen_envsassert_not_frozenstrprefix_pathdefault_prefixis_basejsonprinttupleiter_recordsrQ   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   rF   rG   rH   prefix_dataprefixmsgstptxnspecschannel_urlssubdirssolver_backendsolverrE   s                            @r5   executer      sc   &2>- 
 <-8#HH**W
 	
 ))+K""$""%%'(()FxxK:g.D.D#EEX#C((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 &J54J5)__doc__loggingargparser   r   r   	reportersr   	getLogger__name__logr6   intr   rI   r7   r5   <module>r      s^   
  A A "!|"3 |. |~U) U^ U Ur7   