Skip to content

Instantly share code, notes, and snippets.

@ArnoutDevos
Created December 7, 2018 10:08
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • 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`
@kunal9665
Copy link

thanks man. It's working

@xanderladd
Copy link

thanks!

@vncsna
Copy link

vncsna commented Feb 22, 2021

thanks!!

@bonaquaVDZ
Copy link

Sorry, but I can not understand, where should I write it?

@ArnoutDevos
Copy link
Author

Sorry, but I can not understand, where should I write it?

This is a .sh (bash) script. You can run it in your unix/linux/macos terminal.
More info: https://fileinfo.com/extension/sh

@vishalgp19
Copy link

Thanks buddy..

@hqkhanhai
Copy link

Thank you very much!!!!
It works well

@alrightkami
Copy link

thank you! very usefull

@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