DeepSeek Harness on disk: DSH plugin and session data

Concepts & ArchitecturePublished 2026-10-17Author: DeepSeek Plugin Market
DeepSeek Harnessdshdsh plugindata directorybackupdisk cleanup
What DeepSeek Harness writes to disk: install versus data directory, where DSH plugin records and sessions live, backup priorities, cleanup and migration.

Understanding DeepSeek Harness on disk starts with separating two trees: the program install directory and the data directory. The first is reinstallable (executables and dependencies); the second is yours (profile configuration, installed DSH plugin records, sessions, credentials). Plugin records live in the data directory, not with the program — which is why reinstalling keeps your plugins, and why launching with a different data directory makes them vanish. Once that is clear, backup, cleanup, migration and multi-machine alignment all get simpler: back up the data directory, clean the caches, reinstall the program.

Two trees: install directory versus data directory in DeepSeek Harness

Bottom line: the program directory can be deleted and reinstalled; the data directory cannot be deleted. Their separation explains almost everything else.

Install directoryData directory (DSH_HOME)
ContentsExecutables and dependenciesProfile config, installed DSH plugin records, sessions, credentials
If deletedReinstall restores itLoses configuration and sessions; plugins must be reinstalled
RelocationReinstallChange the environment variable
Backup valueNone (regenerable)High (not regenerable)
Multi-machine roleInstall per machineDetermines whether two machines behave alike
  1. Check the data directory: echo $DSH_HOME. Empty means the default is in use, in which case you should set it explicitly so you always know where data lives.
  2. Check the program location: which -a dsh and npm ls -g @deepseek-ai/dsh, confirming where it is installed and how many copies exist.

Bottom line: an explicit data directory is the foundation for backup, migration and multi-entry sharing. The cost is one line of configuration.

  1. Set and persist it:
bash
export DSH_HOME="$HOME/.dsh"      # add to ~/.bashrc or ~/.zshrc
mkdir -p "$DSH_HOME"
  1. Make every entry read the same value. The CLI inherits the shell environment; the desktop app and web UI need the variable in their launch environment too, or they will use a different directory.
  2. Verify:
bash
ls -la "$DSH_HOME"       # expected: profile and session subdirectories (names vary by version)
  1. Payoff: once the location is fixed, backup scripts, migration and container volume mounts can reference it directly.

Option B: isolate environments by profile

Bottom line: when you need a work setup and an experiment setup, isolate with profiles rather than swapping data directories back and forth.

  1. Use --profile to select separate profiles (confirm the flag with dsh --help), each with its own configuration and DSH plugin set.
  2. Point experiments at a separate data directory for complete isolation — the same tactic recommended for diagnosing plugin conflicts (see DSH plugin conflicts).
  3. Write one line of documentation per environment: which directory, which plugins. Future you will not remember.
  4. Clean per profile, never the whole directory.

Option C: move the DeepSeek Harness data directory elsewhere

Bottom line: to relieve local disk pressure or share storage, move the data directory out. Three steps: back up, move, repoint — then verify.

  1. Back up before moving so you can retreat:
bash
cp -a "$DSH_HOME" "${DSH_HOME}.bak"
mv "$DSH_HOME" /Volumes/external/dsh-data     # adjust to your disk
export DSH_HOME=/Volumes/external/dsh-data
  1. Repoint and make it effective for every entry, including desktop and web launch environments.
  2. Verify three things: sessions open, the plugin list is complete, the service starts.
  3. External drive caveats: network volumes and external disks can differ in permissions and filesystem behavior (case sensitivity, locking). Run a full pass before deleting the old copy.
  4. Only then remove the old directory.

Three backup priorities for DeepSeek Harness data

Bottom line: even inside the data directory, priorities differ — back up credentials and configuration, archive sessions, skip caches.

PriorityContentNote
Must back upCredential files, profile configurationLosing them means reconfiguring and reauthorizing; some cannot be regenerated
Should back upSession dataHistory cannot be recovered; value accumulates
No needCaches, indexesRebuildable by re-running
  1. Frequency: credentials and configuration after changes; sessions on a cadence matching your usage.
  2. Method: copy the directory preserving permissions, or package subdirectories separately.
  3. Verify restores: restore once into another machine or a temporary directory. An untested backup is not a backup.

Cleaning and reclaiming DeepSeek Harness disk space

Bottom line: touch caches and old sessions, never configuration or credentials. Look at size distribution first.

  1. Option one: clear package caches (safest, fastest payoff):
bash
npm cache verify        # verify first
npm cache clean --force # then clear if needed (slows the next install)
  1. Option two: prune old sessions through session deletion operations rather than deleting the directory.
  2. Option three: rebuild indexes and projection caches, which usually reclaims a lot — but only after confirming those directories are caches, not business data.
  3. Measure before deciding:
bash
du -sh "$DSH_HOME"/* 2>/dev/null | sort -h | tail -5
# expected: the largest subdirectories, which tells you what to clean
  1. Never delete the whole directory as a cleanup strategy — that takes configuration and credentials with it.

DSH plugin troubleshooting around data locations

Bottom line: always check DSH_HOME, then version, then the plugin itself.

  1. Plugins missing — check whether DSH_HOME changed (new shell, new container, new entry point).
  2. Plugins missing after moving machines — reinstall from the manifest; packages do not move with the data directory.
  3. Low disk — follow the priority table: caches, then old sessions, then consider moving the data directory.
  4. Odd behavior after migrating — check external drive permissions and filesystem differences.
  5. Multiple environments — use profiles, not directory swapping.
  6. Repair status, stated honestly: the division of responsibilities here follows the official CLI's home and profile notes plus common practice. Subdirectory names and structure change between versions, so verify with ls "$DSH_HOME" and the official README.

Sources: apps/cli/README.md, apps/desktop/README.zh.md, npm Docs · npm cache.

FAQ

Where does DeepSeek Harness store files, and which directories lose data if deleted?

Two categories matter: the program install directory, which a reinstall restores, and the data directory pointed to by DSH_HOME, which holds profile configuration, installed DSH plugin records, sessions and credentials. Program files are safe to delete; deleting the data directory loses sessions and configuration and requires reinstalling plugins. Confirm which one you are deleting before cleaning disk.

Where are DSH plugin packages recorded, and why do plugins survive deleting the program directory?

In DeepSeek Harness, plugin installation records and configuration live in the data directory (DSH_HOME), not alongside the program. That is why reinstalling the program can keep the plugin list, and why launching with a different data directory makes plugins appear to vanish. The deciding factor is always where DSH_HOME points.

How do I move the DeepSeek Harness data directory to an external drive?

In DeepSeek Harness, move the whole data directory to the target location and point DSH_HOME at the new path. The critical part is making every entry — CLI, desktop app, web UI — read the same value, or entries will show different data. Back up before moving and verify sessions and plugin lists afterward.

Which DeepSeek Harness files are safe to delete when reclaiming disk space?

In DeepSeek Harness, cache-like data is safe because it can be rebuilt; profile configuration, session data and credentials in the data directory are not. Look at size distribution before cleaning — caches and historical sessions are usually the bulk. Handle those rather than deleting the whole directory.

How do I move a DeepSeek Harness environment to a new computer?

In DeepSeek Harness, move two things: the data directory, which preserves configuration, sessions and plugin records, and package reinstallation for the plugin list, since packages themselves live in install locations. Verify three things on the new machine: sessions open, the plugin list matches, and the service starts.

Related Terms

DSH_HOME (data directory)
DSH_HOME is the directory where DeepSeek Harness keeps mutable state: profile configuration, installed DSH plugin records, session data and credentials. It is separate from the program install directory, so it can be backed up, moved and cleaned independently.— https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/README.md
install directory
The install directory holds the DeepSeek Harness program itself, such as a global npm location. It contains executables and dependencies only, so deleting or replacing it does not affect your sessions and plugin records, making it the safest thing to reinstall.— https://docs.npmjs.com/cli/v10/commands/npm-cache
profile
A profile is a DeepSeek Harness unit isolating configuration and plugin sets, stored under the data directory. Storing environments by profile is how one machine runs multiple independent setups.— https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/README.md
cache directory
A cache directory holds rebuildable intermediate artifacts such as package caches and indexes. Deleting it loses no business data; it only makes the next run slower or require re-downloading, which makes it the first target when reclaiming space.— https://docs.npmjs.com/cli/v10/commands/npm-cache

Sources