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
.ipynbnotebook 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)
- Close Jupyter Notebook / JupyterLab.
- Run the cleanup command:
# macOS / Linux
rm -rf ~/.local/share/jupyter/runtime/*
# Windows (PowerShell)
Remove-Item -Recurse -Force $env:AppData\jupyter\runtime\*
Related Guides
- Learn about deleting PyCache folders.
- How to clean up Conda package cache.
- Check if you can clean Python venv folders.
Discussion
Loading authentication...