Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Delete all your gists
var async = require('async');
var GitHubApi = require('github');
var github = new GitHubApi({
version: '3.0.0',
protocol: 'https'
type: 'basic',
username: 'user',
password: 'pass'
function (callback) {
github.gists.getAll({}, callback);
function (gists, callback) {
// filter gists by properties as needed
async.each(gists, function (gist, callback) {
}, callback);
}, callback);
], function (err) {
if (err) {
console.log('Execution failed: %s', err.message);

This comment has been minimized.

Copy link

@hmpandey hmpandey commented May 14, 2016

please can you provide little much document regarding this


This comment has been minimized.

Copy link
Owner Author

@gabmontes gabmontes commented Dec 17, 2016

@hmpandey it just iterates over all your gists and deletes one by one using the GitHub API. As simple as that!!


This comment has been minimized.

Copy link

@mikedevita mikedevita commented May 25, 2017

FYI i had to modify this a bit, change line 21 to be, and then it worked for me. I also noticed it only deletes ~50 at a time.

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