{"id":14980426,"url":"https://github.com/chris-sekira/phantom-killer","last_synced_at":"2026-03-06T20:02:40.797Z","repository":{"id":126763883,"uuid":"269740350","full_name":"chris-sekira/phantom-killer","owner":"chris-sekira","description":"A simple Powershell script utility to kill zombie processes","archived":false,"fork":false,"pushed_at":"2020-07-21T20:20:49.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T09:46:54.796Z","etag":null,"topics":["powershell","powershell-core","powershell-scripting"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/chris-sekira.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":"2020-06-05T18:42:44.000Z","updated_at":"2024-10-06T11:51:16.000Z","dependencies_parsed_at":"2023-06-17T23:45:30.955Z","dependency_job_id":null,"html_url":"https://github.com/chris-sekira/phantom-killer","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"fb5173072263bc26ebdd646e4d9ee7d2b71ed169"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chris-sekira/phantom-killer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-sekira%2Fphantom-killer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-sekira%2Fphantom-killer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-sekira%2Fphantom-killer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-sekira%2Fphantom-killer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-sekira","download_url":"https://codeload.github.com/chris-sekira/phantom-killer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-sekira%2Fphantom-killer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30195553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["powershell","powershell-core","powershell-scripting"],"created_at":"2024-09-24T14:01:45.726Z","updated_at":"2026-03-06T20:02:40.769Z","avatar_url":"https://github.com/chris-sekira.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phantom-killer\n[phantom-killer.ps1](powershell/phantom-killer.ps1) is a simple cross-platform Powershell script to safely close lingering (zombie) processes that have been abandoned by their previously-closed parent process. This script only kills processes without a parent, while leaving other instances alone.\n\n## About\n### Purpose\nSometimes programs create child processes, and sometimes those parent processes die without cleaning up their children -- producing zombies! Then you're stuck wondering why you're magically out of RAM, or why you can't delete a folder because _\"child.exe is being used by another program\"_.\n\nInstead of having to open Task Manager, find the process, and terminate them manually, this script will do it for you!\n\n### Compatibility\nThis script works with both Windows \"Desktop\" Powershell and the newer Powershell \"Core\" on Windows/Linux without any additional dependencies. It has been specifically verified with:\n- Desktop (Windows)\n    - Powershell 5.1\n- Core (Windows/Linux)\n  - Powershell Core 6.0\n  - Powershell Core 6.1\n  - Powershell 7.0 (LTS)\n\n#### Note:\nPrior to Powershell 6.0, the `Get-Process` cmdlet lacked the ability to return information about the parent process, requiring a lengthy workaround using `Get-CimInstance` calls. Starting with Powershell 6.0, all of the logic can be reduced down to a simple 1-line statement of\n```powershell\n# $ProcessName contains the name of the zombie process, without the extension (ie: phantomjs, PlexTranscoder, ...)\nGet-Process -Name $ProcessName -ErrorAction SilentlyContinue | Where-Object { ($null -eq $_.Parent) -or $($_.Parent.HasExited) }\n```\n\n## Usage and Help\nDownload [phantom-killer.ps1](powershell/phantom-killer.ps1), open `powershell` or `pwsh`, and run `Get-Help ./phantom-killer.ps1` to see usage info\n### Get PowerShell Help\nUse the built-in help info from PowerShell for usage, parameters, etc.\n```shell\nPS C:\\\u003e Get-Help .\\phantom-killer.ps1\n```\n### See what will be terminated with a dry-run\n\nAs a sanity check it's always good to see what processes will be killed, this will list all `phantomjs` processes that would be killed off\n```shell\nPS C:\\\u003e .\\phantom-killer.ps1 -ProcessName 'phantomjs' -DryRun\n```\n\n### Kill some Zombie Processes\n```shell\nPS C:\\\u003e .\\phantom-killer.ps1 -ProcessName 'phantomjs'\n```\n\n## Misc\n### Why is it called \"Phantom Killer\"?\nBecause 95% of the times that I use this script, it's for rogue `phantomjs.exe` processes.\n\n## Contributing\nFor now, just open up an issue or submit a PR\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-sekira%2Fphantom-killer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-sekira%2Fphantom-killer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-sekira%2Fphantom-killer/lists"}