Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Powershell script to delete old packages from Github repo

License

Notifications You must be signed in to change notification settings

crochik/DeleteGithubPackages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

BE VERY CAREFUL Using the wrong value for any of the parameters may delete all the packages in a repository.

Delete Github packages in a repository

It will delete all the versions of all the packages in the given repository that are older than the olderthan value.

Create Config file

Create or modify the provided config.json file with your desired settings.

config.json:

{
    "token": "<github_token>",
    "owner": "Crochik",
    "project": "DeleteGithubPackages",
    "olderthan": "12/01/19"
    "package": "packagename"
}
  • token: Personal github token with access to ...
  • owner: github account
  • project: github repository
  • olderthan: cut off date, all versions older than this date will be deleted
  • package: name of the package to be deleted

Usage

./DeleteGithubPackages.ps1 -Config <path>
  • -Config <path_to_json_config_file> : Required parameter with path to the configuration file
  • -SkipConfirmation : won't ask for user input (but will introduce a 5seconds delay before starting)

About

Powershell script to delete old packages from Github repo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published