Safe to Delete

Jupyter Notebook Runtime Cache Folder (~/.local/share/jupyter/runtime)

Quick Answer: The Jupyter runtime folder stores active kernel connection JSON files and notebook session logs. Deleting runtime logs is safe.

Bottom Line: It is 100% safe to delete files inside the Jupyter runtime folder. Deleting runtime files will NOT delete your .ipynb Jupyter Notebooks, Python code cells, or markdown notes.


What is the Jupyter Runtime Cache Folder?

Located at ~/.local/share/jupyter/runtime on Linux/macOS (and %AppData%\jupyter\runtime on Windows), this folder is managed by Jupyter Notebook and JupyterLab.

When you open a Jupyter Notebook, Jupyter starts a Python kernel process and creates:

  • Kernel Connection Files (kernel-*.json): ZeroMQ connection parameters allowing the browser frontend to communicate with the Python kernel.
  • Kernel Execution Logs (kernel-*.log): Plain-text logs capturing stdout/stderr from active notebook sessions.

If Jupyter Notebooks crash or are closed without shutting down kernels, hundreds of leftover kernel-*.json and .log files remain trapped in runtime/, taking up 1 GB to 5 GB.


Can You Delete Jupyter Runtime Files?

✅ Yes, it is completely safe to delete.

  • Zero notebook risk: Your .ipynb notebook files stay 100% safe.
  • Safety rule: Only delete runtime files when Jupyter Notebook or JupyterLab is closed.

How to Safely Clean Up Jupyter Runtime Folder

Method 1: Delete via Terminal Command (When Jupyter is Closed)

  1. Close Jupyter Notebook / JupyterLab.
  2. Run the cleanup command:
# macOS / Linux
rm -rf ~/.local/share/jupyter/runtime/*

# Windows (PowerShell)
Remove-Item -Recurse -Force $env:AppData\jupyter\runtime\*

Discussion

Loading authentication...

Related in developer

The AI Engineer's Model Disk Cleanup Guide: Hugging Face, Ollama & PyTorch

The ultimate 1,200-word field guide for AI developers and local LLM hobbyists to reclaim 200GB+ from Ollama, Hugging Face, PyTorch, and vLLM model weights.

Safe to Delete

Android Studio System Index Cache (AndroidStudio Cache)

Android Studio caches Gradle project indexes, VFS caches, and compiler artifacts. Invalidate and clear is safe.

Safe to Delete

Ansible Automation Temp & Fact Cache (~/.ansible/tmp)

Ansible stores temporary playbook execution modules and target host fact JSON caches in ~/.ansible/tmp. Clearing Ansible tmp is safe.

Safe to Delete
Back to all files