Clean up student´ repositories from Organization

Hi,

I´m about to prepare next semester content in github classroom and plan to use same organization classrooms.

Now I can see about 777 student repositories in this semester. How can I delete all student repositories from an organization? How do you handle this situation?

Tks

1 Like

:wave: Hi @ftfernandes this should help:

2 Likes

Tks @ericdrosado

I´ll try removing the assignment instead of the script option.

I try to figure out a simple way, but not success. Here are several plans:

  1. Delete the organization. This is the quick way to remove all students’ work. You need to create a new organization and add all assignments again.
  2. Delete all assignments without delete organization. It will remove all students’ work but you need add all assignments again.
  3. Use this webpage: https://reporemover.xyz/. But it can only show 100 repos a time and you need repeat 8 times to remove all students’ work. You need to be careful not to remove your master repos. You can leave a message to author to help pull 1000 repos a time.

Hi @canhelp2001.

I think option 3 is what i was looking for. Better than recreating assignments.

Maybe It should be incorporated in Github in future releases.

Tks

FWIW, my plan is that every year I create a new organization (e.g., github.com/RiceComp215-Fall2019 then RiceComp215-Fall2020), and I leave all the old repos in place. Students put all that effort into their work, why not just leave it be?

If you really wanted to nuke a directory full of repositories, it’s a straightforward API call (https://developer.github.com/v3/repos/#delete-a-repository), which would be a one-liner change to one of my github-classroom-utils.

I have completed my clean up. The best solution is to create a new classroom and delete the old classroom.

The advantage of this operation:

  1. You don’t need any third party app to delete repos which may cause a mess to your github account.
  2. You don’t need to re-apply a new orginaztion which may take 1 week.
  3. It didn’t take so much time. It took me 30 minutes to add 15 assignments into the new classroom and updated all the assignment links in my assignment instructions (I have all the assignment templates in my github account and it is very easy to add them into new classroom).

I deleted the classrooms as suggested by @canhelp2001.

In the meantime, I noticed an option to “archive” the classroom. That would be great if this option could hide all repos from past courses and the specified classroom, leaving the repos readonly for the students and/or notify them for cloning the repos for backup until a deadline.

© 2017 GitHub, Inc.
with by
GitHub Education