Skip to content

Instantly share code, notes, and snippets.

@ArnoutDevos
Created December 7, 2018 10:08
Show Gist options
  • Save ArnoutDevos/46704443f2456ded8da2c3266b216cd4 to your computer and use it in GitHub Desktop.
Save ArnoutDevos/46704443f2456ded8da2c3266b216cd4 to your computer and use it in GitHub Desktop.
command to remove automatically created .ipynb_checkpoints folders and their checkpoints
rm -rf `find -type d -name .ipynb_checkpoints`
@terri-yaki
Copy link

It worked tysm!

@busedagidir
Copy link

thank you, very useful! :)

@MingchangLi
Copy link

thanks, it's useful

@AmirHossein-Rahaei
Copy link

AmirHossein-Rahaei commented Nov 29, 2022

sorry dude, do I need to install bash first?
or I can write it on the command window?
I do not have Linux or macOS.

@engmahmoudreda1983
Copy link

Thanks, it works.

@jedg75
Copy link

jedg75 commented Feb 8, 2023

This doesn't delete it, it finds them but don't delete them :

find: illegal option -- t
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

@lpuglia
Copy link

lpuglia commented Feb 14, 2023

if you have linked folders:

rm -rf `find -L -type d -name .ipynb_checkpoints`

the -L make it recursive for symbolic link as well

@luxunL
Copy link

luxunL commented Mar 7, 2023

Thank you, very helpful!

@WoodenSwordMaster
Copy link

Sorry, I use Window11. How can use this code.

@kikislater
Copy link

Sorry, I use Window11. How can use this code.

In WSL or Cygwin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment