How To Archive & (Optionally) Delete Flatiron Curriculum Repos

Christian Cain
2 min readDec 16, 2020

This a short tutorial for how to use a CLI called flatiron_sweep to clone & optionally delete repos associated with the Flatiron curriculum.

When I graduated, I found myself with a grand total of 348 repos in my GitHub. Of which around 95% of these were repos that I had forked as a requirement for the curriculum. I was very reluctant to dedicate an entire day to manually clone & delete 300+ repos, so I found this to be a fine task to automate!

This uses Python, which I know many may not be familiar with right after Flatiron, but you don’t need to write code.

Using this CLI personally brought me down to a manageable total of 17 GitHub repos, in a safe & controlled process!

Disclaimer

If deleting repos isn’t your jam, then don’t select the delete option when creating your GitHub token. If you do this then there is absolutely no way repos can or will be deleted!

Also, make sure you don’t already have a directory name “flatiron_repos” located in Desktop.

Steps

  1. Ensure that you have python3 & pip installed
  2. Run “pip install flatiron_sweep”
  3. Generate a GitHub token. Select the delete repo option only if you want to delete repos.
  4. Run “flatiron_sweep --txt”
  5. Next you will be prompted to enter your: GitHub username, the GitHub token you generated, and also your 6 digit cohort date (shout out 081219)
  6. A txt file entitled “flatiron_sweep_repos” should be added to your desktop. These are repos the CLI flagged! PLEASE read over them to make sure any personal repos aren’t listed!
  7. Run “flatiron_sweep --clone” & additionally “--delete" if desired
  8. Fill out the same info
  9. There should now be a directory named “flatiron_repos” in your Desktop!

This really helped to curb my GitHub OCD, and I hope you found it beneficial as well!

Please feel free to comment or submit an issue if you find any area that could be improved!

--

--