Bulk Remove Students Tool

17 12 1,909

I created a new userscript for removing students from courses in bulk. This will be particularly useful when managing clubs/activity and remediation manually created courses that aren’t set to conclude. For instance, I can see us using this heavily to manage NHS/NJHS, Class of "2018" courses, LOTE clubs, and anything else that has rolling members.


To setup the script –

  1. Install Tampermonkey (if you don’t have it already)
  2. Install the script by going to the following link
    1. Click the “install” button that pops up in Tampermonkey
  3. Change the "@include" on line 7 to match your institutions Canvas URL setup
    // @include https://*.instructure.com/courses/*/users‍
  4. It is currently setup to only be visible to admin as our teachers don't have enrollment privileges
    1. If you are a teacher with enrollment privileges (you can add/remove people), then change Line 22 to include "teacher" as a role.
      var buttonRoles = ["teacher", "admin", "root_admin"];‍‍


To use the script –

  1. Open Chrome
  2. Navigate to the people tab in a course and it should pop up near the top.



  1. Lists student name, section, enrollment date, and last activity date in a sortable table.
  2. Select All checkbox
  3. Add more students button to load the next 100 students

Limitations –

  1. This currently only works for students. I figure we don’t usually have more than a handful of teachers in a course, so that can usually be managed by hand.

Let me know what you think and if have feature ideas or improvements, let me know!

*EDIT 4/22/19 - Added Section column*




This is wonderful! Thanks so much! Lisa

Community Member

This is a very nice tool. I hope to modify it to add and remove teachers.


If the script is modified to add/remove teachers, can you share it with all of us? That would be a great extra feature.


Community Member

You bet! Smiley Happy


Just make sure to make a fork off of my GitHub Smiley Happy


When developing some tools for migrating grades for students from another system to Canvas, I found it useful to be able to remove all of the users from a course (except for myself) and to be able to remove assignments and custom columns from the gradebook. Therefore, I wrote two python script to do this. See Remove users and remove assignments & custom columns: Chip sandbox 

Unlike @chadscott@katyisd.org 's tool, my script does not let you manually selected users, but rather gets rid of all users (except for the user running the program). So the purpose is quite different, but sometimes it is useful to remove all of the users in a course - in order to start over.

I should also note that I used this when experimenting in the test environment so that there are no permanent records generated.


I like Chad's idea. I have one question and one recommendation/suggestion to add.

First the recommendation/suggestion. Could this be adapted for Admins to make quick selections across courses?

The question. The removal feature for Teachers in the People section that was once available for manually added users appears to have disappeared. Is anyone aware of any changes that may have led to this?

Community Member

Hi Chad

I've modified the script so it only works with Observers, interested in making it work with a number of roles.  I'm no API developer but I know a bit about programming.  I'm finding it only deletes about 10 to 20 observers at a time, wondered if you had any idea why that would be?

Never used GitHub but happy to share with you or follow instructions on how to add it Smiley Happy



Community Member

I was able to change the Bulk Remove Students Tool to Bulk Remove Teachers Tool. IT works on the same principles that if you have more than one Teacher in a shell, you can bulk remove them. Here is a link to the file on our Google Drive. Bulk Teacher Remove Tool. If you are having trouble downloading it, please let me know.

John Bokenoogen, PhD

Director of Academic Technology

University of Oklahoma


Hi David,

I recently noticed that myself. I guess I never tried removing more than a handful at a time during testing. I think it might be hitting up against the API call throttle...I'll have to investigate this summer and come up with a fix. I think others have talked about this issue and I'll just need to find their blog post about it and implement the work-around.


The throttle may be an issue, but if you're calling from within a browser, you can only have about 6 concurrent requests at a time unless people have tweaked their settings. I would look at the network traffic in the browser's developer tools where you can see the response headers and tell if the x-rate-limit-remaining is getting close to 0. If you're making calls synchronously (I doubt it since you're using JavaScript), then you'll basically never hit the threshold. If it's a super-long-running script, then you may be hitting the execution limit (about 5 minutes with Chrome). Again, that doesn't seem likely.

Community Member

Brilliant Tool - will save so much time Smiley Happy

About the Author
I am best and happiest organizing data and ideas into information to solve complex problems. I must be creative and free to tinker and change as new processes and techniques come available.