DSH plugin 怎么卸载?dsh plugin remove 命令与 DSH 清理指南

卸载与清理发布于 2026-08-19作者: DSH-Plugin 插件中心
DSH pluginDeepSeek Harness卸载dsh plugin remove清理
卸载 DSH plugin 用 dsh plugin --profile web remove <包名>,命令会转发给 pnpm 移除依赖。想彻底卸载 DSH 本体,npx 方式没有全局安装,删除 ~/.dsh 数据目录即可;源码构建的还要清理仓库和 pnpm 缓存。

卸载 DSH plugin 用 dsh plugin --profile web remove <包名>,想彻底卸载 DSH 本体,删掉 ~/.dsh 数据目录就行。

卸载单个 DSH plugin

removeadd 对称,一条命令移除插件依赖。 在终端执行:

bash
dsh plugin --profile web remove <插件包名>

命令转发给 profile 目录里的 pnpm 执行 pnpm remove,把插件从依赖里摘掉(来源)。重启 dsh web 后,插件的能力就不再加载。卸载只影响你指定的 profile:比如这里只动 webheadless profile 里装的东西不受影响。包名不确定时,先执行 dsh plugin --profile web why <包名> 查依赖,或者到 dsh-plugin.org 插件中心 的详情页核对。卸载命令不会连带卸载 DSH 或其他插件,可以放心执行。

卸完 DSH plugin 要不要清理 profile

单个插件卸载不会动 profile 目录,想清干净可以删整个 profile。 每个 profile 对应 ~/.dsh/profiles/<名字> 一个目录,例如 web profile 在 ~/.dsh/profiles/web。profile 目录里装着插件的依赖声明(package.json)和 profile 自己的清单(dsh.profile 按顺序记录 bundles),删掉整个目录等于把这个 profile 下所有插件和配置一次清空。彻底不要某个 profile,直接删除对应目录即可;webheadless 这两个内置 profile 会在下次启动时自动重建(来源)。如果只是临时不用某个插件,推荐先卸载而不是删 profile,以后想恢复只需要重新 add 一次。

彻底卸载 DSH 本体

卸载本体取决于安装方式,核心是清数据目录。 两种情况:

  • npx 方式:npx 只是临时拉包,没有全局安装文件,删掉 ~/.dsh 数据目录就算卸载完成。
  • 源码构建:删除克隆的 deepseek-harness 仓库,再执行 pnpm store prune 清理 pnpm 缓存,最后删除 ~/.dsh

动手删除 ~/.dsh 之前想清楚:里面既有 profile 配置,也有全部会话记录,删了就都没了。

DSH 还在开发者预览阶段,文件布局(包括 $DSH_HOME 默认值 ~/.dsh)可能调整,动手前以官方文档为准。

卸载 DSH plugin 前的注意事项

卸载不影响会话数据,但建议先备份。 会话记录存在 ~/.dsh/sessions,插件卸载只动 profile 依赖,不动会话。但删除 ~/.dsh 会连会话一起删,所以要留数据就先复制一份。误删插件也不用慌,用《DSH plugin 怎么安装》里的 add 命令装回来即可。卸载后如果发现别的东西也失效,多半是这个插件被别的插件依赖,用 why 命令查一下依赖关系再决定。

来源:dsh CLI README官方 Quickstart

常见问题

DSH plugin 怎么卸载?

执行 dsh plugin --profile web remove <插件包名>,命令转发给 pnpm 移除依赖,重启 dsh web 后插件不再加载。

卸载 DSH plugin 会删掉会话数据吗?

不会。会话数据在 ~/.dsh/sessions,插件卸载只动 profile 里的依赖,不影响会话记录。

npx 装的 DSH 怎么卸载干净?

npx 没有全局安装,删掉 ~/.dsh 数据目录即完成卸载;想清理 npm 缓存可执行 npm cache clean。

源码构建的 DSH 怎么卸载?

删除克隆的 deepseek-harness 仓库,执行 pnpm store prune 清理缓存,再删除 ~/.dsh。

误删了 DSH plugin 还能找回吗?

能。插件来源都记录在 dsh-plugin.org 详情页,用原来的 dsh plugin --profile web add 命令重新安装即可。

来源