Delete empty directory from Jupyter notebook error

10,906

Usually, Jupyter itself creates a hidden .ipynb_checkpoints folder within the directory when you inspect it. You can check its existence (or any other hidden file/folders) in the directory using ls -a in a terminal that has a current working directory as the corresponding folder.

Share:
10,906
Moshee
Author by

Moshee

Updated on June 04, 2022

Comments

  • Moshee
    Moshee almost 2 years

    I am trying to delete an empty directory in Jupyter notebook. When I select the folder and click Delete, an error message pops up saying: 'A directory must be empty before being deleted.'

    There are no files or folders in the directory and it is empty.

    Any advice on how to delete it?

    Thank you!

    • John Gordon
      John Gordon almost 5 years
      Are you sure the directory is empty? It doesn't contain any hidden files/directories, i.e. something like .pycache?
    • Moshee
      Moshee almost 5 years
      Please can you tell me how I can check that. Jupyter notebook is currently running on localhost. When I look into the folder it doesn't contain any files.
  • Moshee
    Moshee almost 5 years
    Thank you. It is creating the checkpoint folder. However it is not being deleted when I try to delete it.
  • Farzad Vertigo
    Farzad Vertigo almost 5 years
    In terminal do rm -rf .ipynb_checkpoints. note that upon revisiting the parent directory from the web UI, it might be recreated.
  • Moshee
    Moshee almost 5 years
    Thank you. I was able to delete the folder.