dsh-code-quote 卸载
September 2, 2026 · View on GitHub
从 DSH profile(默认
web)卸载dsh-code-quote的几种方式。卸载后需重启 profile才真正从运行组合移除(bundle 成员在启动时固定)。该操作只影响本机 profile,不影响已发布的 npm 包与 GitHub 仓库,也不会影响其他人的使用。
方式一览
| 方式 | 命令 / 操作 | 效果 | 适用场景 |
|---|---|---|---|
| 1️⃣ 推荐 | dsh plugin --profile web remove dsh-code-quote | 移除依赖 + node_modules + bundle 记录 | 常规卸载 |
| 2️⃣ 手动清理 | 手动编辑 package.json + pnpm install | 同上,但手工执行 | 转发器异常 / 审计 |
| 3️⃣ 只停用 | 从 bundle 列表移除、保留依赖 | 组合不再加载,但不卸装 | 临时开关 / 对比测试 |
另外,本插件早期也曾以会话内动态插件形态运行(如 quote-1)——那属于会话级,卸载走会话工具,与这里的 profile 安装无关。
方式 1:dsh plugin remove(推荐)
dsh plugin 是 pnpm 的转发器:remove 会把 dsh-code-quote 从 profile 的 package.json 依赖与 node_modules 移除,并同步从 dsh.profile.bundles 删除记录。
dsh plugin --profile web remove dsh-code-quote
完成后重启 profile 使其从运行组合中移除:
dsh web # 或按你平时的启动方式重启
方式 2:手动清理
- 编辑
%DSH_HOME%\profiles\web\package.json:- 在
dependencies中删除"dsh-code-quote": "^0.1.0" - 在
dsh.profile.bundles数组中删除"dsh-code-quote"
- 在
- 在 profile 目录执行
pnpm install(或dsh plugin --profile web install)以清理node_modules - 若
/node_modules/dsh-code-quote仍有残留可手动删除 - 重启 profile
方式 3:只停用、不卸载(保留依赖便于恢复)
把 dsh.profile.bundles 里的 "dsh-code-quote" 移除即可,保留 dependencies 中的条目。重启后组合不再加载该插件,但要恢复时:
dsh plugin --profile web add dsh-code-quote
清理快照数据(可选)
卸载不会删除已落盘的快照数据。如需彻底清理,删除目录:
Remove-Item -Recurse -Force "$env:DSH_HOME\storages\dsh-code-quote"
(若设置了 DSH_CODE_QUOTE_DATA_DIR 覆盖路径,则删除该目录即可。)
通用验证
卸载并重启后,确认组合里已无该插件:
dsh --profile web --dump-config # 不再出现 `- id: dsh-code-quote`
(可选)查看依赖是否已移除:
dsh plugin --profile web ls | findstr dsh-code-quote