How to upgrade dsh: three routes, pinning and downgrading versions

Update & UpgradePublished 2026-08-28Author: DSH Plugin Hub
DeepSeek HarnessDSH pluginupgrade dshupgrade guidepin versiondowngrade dsh
Upgrading dsh means moving to a new version: check the current and latest versions first, then upgrade by install type (npx stays latest, npm runs update -g, source pulls and rebuilds), and pin or downgrade with @version when needed. Covers backup, upgrade vs update, and version management.

Upgrading dsh means moving to a new version: check the current and latest versions first, then upgrade by install type — npx stays latest, npm update -g for globals, git pull plus rebuild for source — and pin or downgrade with @version when needed. This guide covers upgrade vs update, three upgrade routes, backup before upgrading, and version pinning and downgrading.

Overview: upgrading changes the version, never your data

An upgrade only swaps the program's version number; configs, sessions and plugins under ~/.dsh are all preserved. Three principles (source):

  1. Check before upgrading: compare the current and latest versions;
  2. Upgrade by install type: npx, npm and source each have their own command;
  3. Versions are manageable: pin or downgrade whenever needed.

The upgrade paths at a glance:

ScenarioCommandNote
Upgrade to latest (npx)npx @deepseek-ai/dsh webAlways fetches the latest on every run
Upgrade to latest (npm global)npm update -g @deepseek-ai/dshOne command
Upgrade to latest (source)git pull + rebuildRun inside the repo directory
Pin to a specific versionnpm install -g @deepseek-ai/dsh@<version>Blocks automatic upgrades
Downgrade to an older versionSame, with an older version numberFast rollback when something breaks

Step 1: check the current and latest versions

Know your version landscape before acting, and avoid blind upgrades. Steps:

  1. Open a terminal and check the current version:
bash
# Current version (global install)
dsh --version

# Current version (npx route)
npx @deepseek-ai/dsh --version
  1. Check the latest version on npm:
bash
npm view @deepseek-ai/dsh version
  1. Compare the numbers: if the current version is lower than the latest, an upgrade is due; for the differences between versions, check the changelog on dsh-plugin.org or the official release page.

Back up the data directory before upgrading so you can always roll back if the new version misbehaves. Everything lives in ~/.dsh:

bash
# Back up (configs, sessions, plugin list)
cp -r ~/.dsh ~/.dsh.backup-$(date +%Y%m%d)

# Also record the current version for comparison
dsh --version > ~/.dsh.version.old

Step 3: upgrade by install type

Upgrade commands map one-to-one to install types — pick the one you originally used. Three routes:

Route 1: npx (always latest)

npx re-pulls the latest version on every run, so no manual upgrade is needed. Just start:

bash
npx @deepseek-ai/dsh web

Fallback: if the launched version is still old, the cache is stale — force a refresh:

bash
npm cache clean --force
rm -rf ~/.npm/_npx
npx @deepseek-ai/dsh web

Route 2: npm global upgrade

If you installed globally, npm update -g upgrades to the latest in one step. Steps:

bash
# Upgrade to the latest
npm update -g @deepseek-ai/dsh

# Confirm the version
dsh --version

If you used pnpm or yarn, use the equivalent: pnpm add -g @deepseek-ai/dsh@latest or yarn global add @deepseek-ai/dsh.

Route 3: source build upgrade

If you cloned and built from source, pull the latest code in the repo directory and rebuild. Steps:

bash
# Enter the source repo directory
cd ~/dev/deepseek-harness

# Pull the latest code (git stash first if you have local changes)
git pull

# Reinstall dependencies and rebuild (same as the initial install)
npm install
# Run the build command from the repo docs, e.g. npm run build

Once the build finishes, restart dsh web to use the new version.

Step 4: pin or downgrade the version

When a new version feels off or a plugin is incompatible, pin or downgrade. Steps:

bash
# Install a specific version globally (@ then the version)
npm install -g @deepseek-ai/[email protected]

# Confirm the version is back to the target
dsh --version

# Start a pinned version with npx (to verify the old version temporarily)
npx @deepseek-ai/[email protected] web

After pinning, npm update no longer bumps it automatically — a good fit for environments that need stability (source). To list all historical versions on npm, run npm view @deepseek-ai/dsh versions.

Step 5: verify after the upgrade

Confirm the version and functionality after upgrading, to avoid a "fake upgrade". Steps:

  1. Re-run the version command and confirm the number changed;
  2. Restart dsh web and confirm the page opens;
  3. Open Settings → Plugin Center and confirm installed plugins load normally (with DSH Plugin Hub installed, you will see the plugin list and versions);
  4. Check the notification center and system logs for any upgrade errors.
dsh-plugin-hub · notifications
DSH Plugin Hub notification center

Upgrade failed? Troubleshooting table

Read the error type first, then fix accordingly. Common issues:

ProblemLikely causeFix
Version unchanged after upgradeStale cache / command did not finishClean the cache (npm cache clean --force) and retry; check the output
npm update -g fails with EACCESNo write access to global dirsudo npm update -g @deepseek-ai/dsh, or switch to the npx route
Download timeoutSlow default npm registrynpm config set registry to a mirror and retry
git pull reports conflictsLocal source changesgit stashgit pullgit stash pop
Plugins stop working after upgradePlugin incompatible with new dshRestart dsh, then reinstall the plugin from Plugin Center
Want to go back to an old versionNew version changed behaviorDowngrade with npm install -g @deepseek-ai/dsh@<old version>
Do not know which versions existNever listed versionsnpm view @deepseek-ai/dsh versions lists all historical versions
Web page does not open after upgradePort occupied / service not restartedRestart dsh web; check whether port 127.0.0.1:3080 is in use

One more thing: keep plugin versions in sync too

After upgrading the dsh core, watch plugin compatibility as well. The DSH Plugin Hub plugin pages show the compatible version each plugin is marked with; after upgrading, open Settings → Plugin Center and update any outdated plugins one by one to keep both in sync.

Quick reference

In one sentence: back up and check versions before upgrading, upgrade by install type (npx automatic / npm update -g / git pull + build), pin with @version when you need stability, then restart and verify. Four reminders:

  1. Record the old version before upgrading so you can downgrade easily;
  2. The npx route needs no manual upgrade — just clean the cache;
  3. Pin versions with @version: npm install -g @deepseek-ai/dsh@<version>;
  4. Restart before troubleshooting plugins after an upgrade, then consider reinstalling.

Sources: dsh CLI README, DeepSeek Harness docs - Quickstart, dshplugin/dsh-plugin-hub

FAQ

What is the difference between upgrading and updating dsh?

In daily usage they overlap: updating usually means syncing to the latest patch, upgrading means moving to a higher or a specific version. Both just change the version number with the same commands: npx stays latest, npm globals run npm update -g, source pulls and rebuilds.

How do I upgrade dsh to the latest version?

The npx route fetches the latest on every run; globals run npm update -g @deepseek-ai/dsh; source builds git pull and rebuild in the repo directory. Restart dsh web and confirm with dsh --version after upgrading.

How do I check the current and latest dsh version?

Current: dsh --version (global) or npx @deepseek-ai/dsh --version. Latest: npm view @deepseek-ai/dsh version. Comparing the two tells you whether an upgrade is needed.

How do I pin or downgrade the dsh version?

Install a specific version globally: npm install -g @deepseek-ai/dsh@<version>, for example @0.1.0-rc.8; for npx, run npx @deepseek-ai/dsh@<version> web. Once pinned, npm update will not bump it automatically — good for stable environments.

Do my plugins still work after upgrading dsh?

Usually yes. Plugins live in the profile and $DSH_HOME data stays, so upgrading the binary does not affect installed plugins. If a plugin is incompatible with the new version, reinstall it from Settings → Plugin Center.

Sources