Uninstall TileLang: pip removal, cache and leftovers

Uninstall & CleanupPublished 2026-10-01Author: DeepSeek Plugin Market
TileLangtilelang uninstallpip uninstallcompile cacheleftoversAscend NPUtilelang-ascend
Uninstall TileLang: pip uninstall tilelang or tilelang-ascend, clear the ~/.tilelang/cache and build/ leftovers, and keep CANN and torch-npu intact.

Uninstalling TileLang takes three steps: run pip uninstall tilelang (or pip uninstall tilelang-ascend on Ascend), clear the ~/.tilelang/cache compile cache and any build/ directory from a source build, then confirm with a failing import and an empty pip show — all while leaving CANN and torch-npu untouched.

This article follows remove → clean leftovers → verify. If you are only changing versions rather than removing TileLang, read Update TileLang first.

How do I uninstall TileLang?

Uninstalling TileLang is a single pip uninstall with the package name for your route: pip uninstall tilelang on NVIDIA, pip uninstall tilelang-ascend on Ascend (source).

  1. Confirm which package is installed. Run pip show tilelang and pip show tilelang-ascend. Expect output from only one of them — that is the one to remove (source).
  2. Read the removal list before confirming. Run pip uninstall tilelang (or tilelang-ascend); pip lists the files it will remove before asking. Expect a list containing only TileLang's own files, with no dependencies such as torch-npu.
  3. Confirm the removal. Type y at the prompt, or pass -y to skip the prompt. Expect the terminal to print Successfully uninstalled.
  4. Delete the environment if you installed into one. If TileLang went into a venv or conda environment that is no longer needed, deleting the whole environment is cleaner than removing packages one by one. Expect the environment directory to disappear with the system Python untouched.

What leftovers does TileLang leave, and how do I clean them?

TileLang leftovers sit in three places: the compile cache at ~/.tilelang/cache, a build/ directory from a source build, and the shell variables set_env.sh exported on Ascend (source).

  1. Clear the compile cache. Run rm -rf ~/.tilelang/cache. Expect the cache directory gone, so a later install does not reuse artifacts from before the uninstall (source).
  2. Clear source build output. If you built from a git clone, delete the build/ and dist/ directories in that tree. Expect both the disk space and the chance of a stale artifact to be gone.
  3. Clear shell variables. On Ascend, if you ran export ASCEND_HOME_PATH=... manually or added source set_env.sh to ~/.bashrc, remove the extra line. Expect a new shell to reflect only what you intend — but note that CANN's own set_env.sh belongs to the Ascend toolkit, so do not delete it just because you removed TileLang.
  4. Clear the pip cache (optional). Run pip cache purge to drop pip's downloaded wheel cache. Expect the download cache tied to this package to be released.

How do I confirm TileLang is fully uninstalled?

Two commands verify it: python -c "import tilelang" should raise ModuleNotFoundError, and pip show tilelang should print nothing; on Ascend repeat with tilelang-ascend (source).

  1. Verify it no longer imports. Run python -c "import tilelang". Expect ModuleNotFoundError: No module named 'tilelang'; if it still imports, the package lives in another interpreter or environment.
  2. Verify the package record is gone. Run pip show tilelang (or pip show tilelang-ascend). Expect no output, or a message that the package is not found.
  3. Confirm dependencies were spared. Run python -c "import torch_npu; print(torch_npu.__version__)" and check the CANN version. Expect both to be healthy, showing the uninstall touched only what it should (source).

TileLang uninstall notes

  1. Do not treat CANN as a leftover. CANN is system-level and pip does not manage it; uninstalling TileLang neither needs nor should touch it, and removing CANN breaks the operator environment for the whole Ascend host.
  2. Judge torch-npu separately. It is a pip package, so pip may offer to remove it during an upgrade or reinstall; keep it unless you actually mean to replace it.
  3. Uninstalling is not the same as rolling back. To change versions, use Update TileLang; uninstalling is for a full removal or a clean restart.
  4. Clear the cache before reinstalling. After a clean uninstall, clear ~/.tilelang/cache so the reinstall pays one rebuild for deterministic results.

The full path back to a working install is in Install TileLang, and the everyday commands are in TileLang command cheatsheet.

Sources: TileLang Installation Guide, tilelang-ascend · PyPI, tile-ai/tilelang-ascend GitHub repository

FAQ

How do I uninstall TileLang, and which package name do I remove?

Uninstalling TileLang uses pip uninstall with the package name for your route: pip uninstall tilelang on NVIDIA, or pip uninstall tilelang-ascend on Ascend. The two routes install separate packages, so removing one leaves the other in place. To wipe everything at once, uninstall inside a virtual environment and then delete the whole environment.

Will uninstalling TileLang also remove torch-npu or CANN?

Uninstalling TileLang never removes CANN, because CANN is a system-level install that pip does not manage. torch-npu is a pip package though, so if you installed or upgraded it, pip may offer to remove it alongside; read the list pip prints, keep only the package you meant to drop, and leave both CANN and torch-npu in place.

What leftovers does TileLang leave behind after uninstall?

TileLang leftovers live in three places: the compile cache at ~/.tilelang/cache, a build/ directory left in the source tree you built from, and the environment variables set_env.sh exported into your shell on Ascend. Delete the first two as directories, and remove the source line from your shell profile such as ~/.bashrc for the third.

How do I confirm TileLang is fully uninstalled?

Two checks confirm a clean TileLang uninstall: python -c "import tilelang" should raise ModuleNotFoundError, and pip show tilelang should print nothing. On Ascend repeat with tilelang-ascend, and confirm CANN and torch-npu kept their versions, which shows the uninstall touched only what it should have.

What happens if I uninstall tilelang but keep its compile cache?

Uninstalling TileLang while keeping ~/.tilelang/cache will not block a reinstall, but the cached artifacts may come from the version you just removed, and a reinstall or version change that still hits them can produce unexpected results. Clear that directory before reinstalling, trading one rebuild for deterministic output.

Related Terms

TileLang
TileLang is a tile-level domain-specific language built on the TVM compiler stack and started by a Peking University team, generating high-performance GPU and NPU kernels from Python-like syntax. DeepSeek announced its Ascend edition on 2026-09-30.— TileLang Installation Guide
tilelang-ascend
tilelang-ascend is the separate TileLang distribution for Huawei Ascend NPUs, removed with pip uninstall tilelang-ascend; it is a different package from tilelang on the NVIDIA side.— tilelang-ascend · PyPI
compile cache
TileLang's compile cache lives at ~/.tilelang/cache and stores compiled kernel artifacts; delete it after an uninstall or version change so old artifacts are not reused in a new environment.— TileLang Installation Guide
ASCEND_HOME_PATH
ASCEND_HOME_PATH is the Ascend toolkit root variable, normally written into the shell by CANN's set_env.sh; uninstalling tilelang-ascend does not require removing it, and CANN itself stays.— tilelang-ascend · PyPI

Sources