{"id":18877657,"url":"https://github.com/linuxeuphony/delete-old-git-branches","last_synced_at":"2026-02-19T05:30:16.701Z","repository":{"id":237405343,"uuid":"611111585","full_name":"LinuxEuphony/delete-old-git-branches","owner":"LinuxEuphony","description":"This is an automated bash script to delete git branches older than some specific time period.","archived":false,"fork":false,"pushed_at":"2023-03-08T08:26:47.000Z","size":21,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T02:25:13.724Z","etag":null,"topics":["git","gitbash","gitops"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinuxEuphony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-08T06:07:43.000Z","updated_at":"2023-11-06T09:49:46.000Z","dependencies_parsed_at":"2024-05-01T11:24:04.977Z","dependency_job_id":"35537fe2-6c98-42b7-a5cb-c9e11aa6dce6","html_url":"https://github.com/LinuxEuphony/delete-old-git-branches","commit_stats":null,"previous_names":["linuxeuphony/delete-old-git-branches"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxEuphony%2Fdelete-old-git-branches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxEuphony%2Fdelete-old-git-branches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxEuphony%2Fdelete-old-git-branches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxEuphony%2Fdelete-old-git-branches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinuxEuphony","download_url":"https://codeload.github.com/LinuxEuphony/delete-old-git-branches/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239837877,"owners_count":19705446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","gitbash","gitops"],"created_at":"2024-11-08T06:20:41.888Z","updated_at":"2026-02-19T05:30:16.640Z","avatar_url":"https://github.com/LinuxEuphony.png","language":"Shell","readme":"# delete-old-git-branches\n\n\u003cbr\u003e\n\n![GitHub issues](https://img.shields.io/github/issues/LinuxEuphony/delete-old-git-branches?\u0026labelColor=black\u0026color=eb3b5a\u0026label=Issues\u0026logo=issues\u0026logoColor=black\u0026style=for-the-badge)\n![GitHub Contributions](https://img.shields.io/github/contributors/LinuxEuphony/delete-old-git-branches?\u0026labelColor=black\u0026color=8854d0\u0026style=for-the-badge)\n![repo size](https://img.shields.io/github/repo-size/LinuxEuphony/delete-old-git-branches?label=Repo%20Size\u0026style=for-the-badge\u0026labelColor=black\u0026color=20bf6b)\n![GitHub forks](https://img.shields.io/github/forks/LinuxEuphony/delete-old-git-branches?\u0026labelColor=black\u0026color=0fb9b1\u0026style=for-the-badge)\n![GitHub stars](https://img.shields.io/github/stars/LinuxEuphony/delete-old-git-branches?\u0026labelColor=black\u0026color=f7b731\u0026style=for-the-badge)\n![GitHub LastCommit](https://img.shields.io/github/last-commit/LinuxEuphony/delete-old-git-branches?logo=github\u0026labelColor=black\u0026color=d1d8e0\u0026style=for-the-badge)\n\n\u003cbr\u003e\n\nThis is an automated bash script to delete git branches older than some specific time period. The default set time is 4 months, but you can pass the period in months as a first parameter while running the shell script\n\n----\n\n\u003cbr\u003e\n\n# How to download the script\n\n\n## GIT Clone Option\n  1. Navigate to your preferred directory\n  2. Run terminal\n  3. Type **git clone https://github.com/LinuxEuphony/delete-old-git-branches** to clone repository\n  4. Navigate to the folder named **delete-old-git-branches**\n\n\n## Github Download Option\nTo download and use this script:\n  1. Click on *`code`* on this page.\n  2. Click on *`Download Zip`*.\n  3. A files named *`delete-old-git-branches-main.zip`* will be downloaded. Extract the zip file in your computer. You will see a folder labelled *`delete-old-git-branches-main`*. \n  4. Navigate to that folder.\n  \n  \n  ----\n  \n  \u003cbr\u003e\n  \n  # How to run the file\n\n  1. Navigate to and edit the file named **`delete-old-git-branches.sh`**. Replace the value **`YOUR_REMOTE_OR_LOCAL_GIT_URL`** on line **`13`** with your remote/local git url.\n  2. Open the terminal inside the, or navigate through terminal into the folder named **`delete-old-git-branches-main`**\n  3. Type **`chmod +x delete-old-git-branches.sh`** and click on `enter key` to make the script executable.\n  4. Type **`./delete-old-git-branches.sh`** to run the script.\n\n\u003cbr\u003e\n \n ## Run options\n  \n  1. Below will run with the default 4 months period.\n  \n    ./delete-old-git-branches.sh\n  \n  2. Below will run with preferred timeline set.\n  \n    ./delete-old-git-branches.sh 3\n  \n  3. Below will run with default 4 months period and force delete unmarged branches enabled.\n  \n    ./delete-old-git-branches.sh -f\n    \n  4. Below will run with the preferred time set and force delete unmarged branches enabled.\n  \n    ./delete-old-git-branches.sh -f 3\n  \n\u003c/br\u003e\u003c/br\u003e\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxeuphony%2Fdelete-old-git-branches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxeuphony%2Fdelete-old-git-branches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxeuphony%2Fdelete-old-git-branches/lists"}