ChatGPTClaudeGrok / X / CursorGemini

Uninstall DSH Python SDK: venv, DSH_HOME and sessions

Uninstall & CleanupPublished 2026-10-21Author: DeepSeek Plugin Market
DeepSeek HarnessPython SDKuninstallDSH_HOMEsession logs
Uninstalling the DSH Python SDK takes two parts: remove the wheel and venv, then clean the dsh_home holding profiles, plugins, credentials and sessions.

Uninstalling the DeepSeek Harness Python SDK is two problems, not one: the venv contains the package and runtime, while the explicit dsh_home contains profiles, plugins, credentials, settings, and sessions. They are independent. Remove only the venv and data remains; remove only the home and the Python package remains, ready to create a fresh home on the next call.

DeepSeek Harness: Identify the layers first

Install location and data location are separate, which is why SDK uninstalls often look incomplete. Compare:(source)

LayerTypical locationEffect of deletion
venv / wheelproject .venvPython package and bundled dsh command disappear
dsh_homethe path you passprofiles, plugins, credentials, settings, sessions disappear
sessions<dsh_home>/sessions/conversation logs disappear, unrecoverable
global ~/.dshglobal dsh homeunrelated to the SDK; do not delete by mistake

The official docs are explicit: the SDK and its examples never silently read ~/.dsh. Data in ~/.dsh does not prove the SDK used it. Find the dsh_home in the project code before deleting anything.

DeepSeek Harness: What is inside dsh_home

List the directory before deleting so you do not remove sessions you still need. Typical contents:(source)

  • profiles/sdk-minimal/ — package.json, cordis.patch.yml, and plugin dependencies.
  • sessions/ — uncompressed JSONL logs with conversations and tool results.
  • Credentials and settings — provider keys and settings, usually under the home root.
  • Other profiles — any additional profiles you created in the same home.

Run ls first, then decide between deleting the whole directory, only profiles/, or only sessions/. Deleting sessions does not remove plugins; deleting profiles does not remove conversation history.

DeepSeek Harness: Remove the venv and package

The cleanest route is deleting the whole venv; if you want to keep other dependencies, uninstall the SDK inside it. Two routes:(source)

  1. Delete the venv — exit the environment, then remove the directory. Expected: which dsh no longer points at that venv.
  2. Uninstall inside the venv — python -m pip uninstall deepseek-harness-sdk. Expected: the package is removed while other dependencies remain.
  3. Check global installs — if you previously installed into system or user Python, uninstall there too. Expected: which -a dsh lists only the entries you intend to keep.

Example:

sh
deactivate 2>/dev/null || true
rm -rf /srv/work/demo/.venv

Stop running SDK processes first. If the bundled dsh process is still running, deleting files underneath it can leave a partially removed state.

DeepSeek Harness: Clean dsh_home

The home is the data layer; decide about profiles, plugins, credentials, settings, and sessions separately. Steps:(source)

  1. Confirm the path — read it from code or environment variables. Expected: not an assumed ~/.dsh.
  2. List contents — inspect profiles/, sessions/, and plugin directories. Expected: know what to back up and what to delete.
  3. Back up sessions — copy sessions/ somewhere safe. Expected: raw JSONL is available for later review.
  4. Delete the home — rm -rf <dsh_home>. Expected: the next SDK start creates a fresh minimal home.

To reset configuration but keep conversations, delete only profiles/. To clear conversations but keep plugins, delete only sessions/. Do not start with the whole directory.

DeepSeek Harness: Sessions and credentials

Sessions are uncompressed JSONL; credentials and settings also live in the home, so decide their fate separately. Guidelines:(source)

  • Session logs — contain conversations and tool results, possibly sensitive. Recommendation: back up for audit or delete with the home.
  • Credentials — provider keys may live in the home. Recommendation: remove them when no longer needed; do not delete sessions and leave keys behind.
  • Plugins — installed under the profile’s node_modules and removed with the home. Recommendation: record the plugin list for a future environment.
  • Settings — stored with the profile. Recommendation: export or back up patches you want to reuse.

If the machine also runs a global dsh, delete only the SDK home and leave ~/.dsh alone.

DeepSeek Harness: Three cleanup scopes

Choose “remove package / clear data / leave no trace” deliberately; do not default to deleting everything. Compare:(source)

  1. Light: delete venv only — keep the home for a future reinstall. Cost: sessions and plugins stay on disk.
  2. Standard: delete venv and home — remove package and data. Cost: conversations are unrecoverable; a reinstall starts from scratch.
  3. Thorough: also clear caches and backups — delete pip cache, temp directories, and old backups. Cost: irreversible; verify first.

Most development machines need the standard scope. Shared or regulated machines may need the thorough scope.

Verify after uninstalling

Check both layers after the operation, or a hidden entry will recreate the old state. Three checks:

  1. Record paths first — write down the absolute venv and dsh_home paths. Expected: no accidental deletion of global ~/.dsh.
  2. Check commands — which -a dsh and python -m pip show deepseek-harness-sdk. Expected: only the installations you intended to keep.
  3. Run once from a new environment — use a new venv or system Python for a minimal task. Expected: it does not recreate the old home or load old plugins.

If step 3 recreates the old home, the code still hardcodes the old path; fix the code before cleaning further.

DeepSeek Harness FAQ

The dsh command still works after uninstalling—did I miss something? Not necessarily. dsh may come from a global install or another venv. Use which -a dsh to see the source.

Does deleting sessions affect plugins? No. Sessions are logs; plugins live in the profile directory. Plugins remain, but old conversations are gone.

How do I reuse old configuration after reinstalling? Reuse the same dsh_home and restore the original cordis.patch.yml. Do not reuse the old venv; the runtime versions may not match.

The short version: the SDK has a package layer and a home layer; decide both separately instead of treating “uninstall” as one directory deletion.

ChatGPTClaudeGrok / X / CursorGemini

FAQ

Is deleting the venv enough to uninstall the DeepSeek Harness Python SDK?

DeepSeek Harness: no. The venv contains the Python package and bundled dsh runtime, but profiles, plugins, credentials, settings, and sessions live in the explicit dsh_home. Deleting only the venv leaves data; deleting only the home does not uninstall the package.

Does the DeepSeek Harness Python SDK read the global ~/.dsh configuration?

DeepSeek Harness: no. DeepSeek Harness SDK code and examples never silently read ~/.dsh; they use only the dsh_home you pass. Do not delete the global ~/.dsh unless you have confirmed the project uses it.

Where are SDK session logs, and can I delete them?

DeepSeek Harness: they are under the explicit dsh_home/sessions directory as uncompressed JSONL. You can delete them, but they cannot be recovered. Back them up first if the conversation history matters.

The dsh command still works after uninstalling the SDK—why?

DeepSeek Harness: the dsh command from the SDK lives inside the venv and disappears when the venv is removed. A dsh still on PATH is another installation, such as a global npm install, and must be uninstalled separately.

Can I reuse old sessions after reinstalling the SDK?

DeepSeek Harness: yes, if you reuse the same dsh_home and session ID. Reinstalling does not migrate or clear sessions. If the new version requires a format migration, follow the startup prompt.

Related Terms

dsh_home
dsh_home is the isolated SDK home holding profiles, plugins, credentials, settings, and sessions. The SDK uses only the home passed explicitly and does not read ~/.dsh.— DeepSeek Harness docs - Python SDK
venv
A venv is a Python virtual environment. The deepseek-harness-sdk wheel and its bundled dsh command are installed inside it; deleting the venv removes both.— DeepSeek Harness docs - Python SDK
sessions
sessions is the dsh_home directory holding session logs. The SDK writes uncompressed JSONL by default; deleting it removes recoverable conversation history.— DeepSeek Harness docs - Python SDK
sdk-minimal
sdk-minimal is the minimal SDK profile stored under dsh_home/profiles/sdk-minimal. Uninstalling the SDK does not delete it automatically; decide separately whether to clean it.— DeepSeek Harness docs - Python SDK

Sources