Skip to main content

Delete all of your forked repositories on Github.

Reason this release was yanked:

21.1.3

Project description

Fork Purger

>> Delete all of your forked repositories on Github <<

python github_actions

Installation

  • Install using pip:

    pip install fork-purger
    

Exploration

  • Create and collect your Github user access token.

  • Inspect the --help menu. Run:

    fork-purger --help
    

    This will print the following:

    +-+-+-+-+ +-+-+-+-+-+-+
    |F|o|r|k| |P|u|r|g|e|r|
    +-+-+-+-+ +-+-+-+-+-+-+
    
    Usage: fork-purger [OPTIONS]
    
    Options:
    --username TEXT       Your Github username.  [required]
    --token TEXT          Your Github access token with delete permission.
                            [required]
    --debug / --no-debug  See full traceback in case of HTTP error.
    --delete              Delete the forked repos.
    --help                Show this message and exit.
    
  • By default, fork-purger runs in dry mode and doesn't do anything other than just listing the repositories that are about to be deleted. Run:

    fork-purger --username <gh-username> --token <gh-access-token>
    

    You'll see the following output:

    +-+-+-+-+ +-+-+-+-+-+-+
    |F|o|r|k| |P|u|r|g|e|r|
    +-+-+-+-+ +-+-+-+-+-+-+
    
    These forks will be deleted:
    =============================
    
    https://api.github.com/repos/<gh-username>/ddosify
    https://api.github.com/repos/<gh-username>/delete-github-forks
    https://api.github.com/repos/<gh-username>/dependabot-core
    https://api.github.com/repos/<gh-username>/fork-purger
    
  • To delete the listed repositories, run the CLI with the --delete flag:

    fork-purger --username <gh-username> --token <gh-access-token> --delete
    

    The output should look similar to this:

    +-+-+-+-+ +-+-+-+-+-+-+
    |F|o|r|k| |P|u|r|g|e|r|
    +-+-+-+-+ +-+-+-+-+-+-+
    
    Deleting forked repos:
    =======================
    
    Deleting... https://api.github.com/repos/<gh-username>/ddosify
    Deleting... https://api.github.com/repos/<gh-username>/delete-github-forks
    Deleting... https://api.github.com/repos/<gh-username>/dependabot-core
    Deleting... https://api.github.com/repos/<gh-username>/fork-purger
    
  • In case of exceptions, if you need more information, you can run the CLI with the --debug flag. This will print out the Python stack trace on the stdout.

    fork-purger --username <gh-username> --token <gh-access-token> --delete --debug
    
✨ 🍰 ✨

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fork_purger-21.1.3.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

fork_purger-21.1.3-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page