10

I everyday try out my solutions before answering a pandas question in stack overflow . Usually after two to three days the jupyter notebook I use will be with n number of cells. Is there a way to delete all cells at once other than creating new notebook by deleting current one?

D D deletes one cell at a time.

Bharath
  • 28,527
  • 5
  • 52
  • 95

2 Answers2

25

You can delete all Jupyter notebook's cells at once as follows:

  1. Select all cells : ESC + SHIFT + DOWN (starting from the top)
  2. Then click ESC + D D (D twice)
Mohamed Ali JAMAOUI
  • 13,233
  • 12
  • 67
  • 109
0
  1. Hit esc to exit edit mode
  2. Click to select the topmost cell you want to delete. in jupyterlab, a blue vertical line appears to the cell's left.
  3. Hit end to scroll to the bottom of the notebook
  4. Shift-click the last cell (similar to step 2) to select the range of cells to delete.
  5. Hit d, d to delete all the selected cells.

Hope that helps.

itny grad
  • 21
  • 2