Title: fs.rmSync() cannot remove broken symbolic link · Issue #61020 · nodejs/node · GitHub
Open Graph Title: fs.rmSync() cannot remove broken symbolic link · Issue #61020 · nodejs/node
X Title: fs.rmSync() cannot remove broken symbolic link · Issue #61020 · nodejs/node
Description: Version v24.12.0 Platform Microsoft Windows NT 10.0.22631.0 x64 Subsystem No response What steps will reproduce the bug? fs.rmSync() fail to remove broken symlinks. The same operation works correctly in Node.js 22 and earlier. How often ...
Open Graph Description: Version v24.12.0 Platform Microsoft Windows NT 10.0.22631.0 x64 Subsystem No response What steps will reproduce the bug? fs.rmSync() fail to remove broken symlinks. The same operation works correct...
X Description: Version v24.12.0 Platform Microsoft Windows NT 10.0.22631.0 x64 Subsystem No response What steps will reproduce the bug? fs.rmSync() fail to remove broken symlinks. The same operation works correct...
Opengraph URL: https://github.com/nodejs/node/issues/61020
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fs.rmSync() cannot remove broken symbolic link","articleBody":"### Version\n\nv24.12.0\n\n### Platform\n\n```text\nMicrosoft Windows NT 10.0.22631.0 x64\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\nfs.rmSync() fail to remove broken symlinks.\nThe same operation works correctly in Node.js 22 and earlier.\n\n### How often does it reproduce? Is there a required condition?\n\nEverytime\nOnly happens when:\n1. The symlink target does not exist\n2. Using rmSync (rm works correctly)\n\n### What is the expected behavior? Why is that the expected behavior?\n\nfs.rmSync() should remove the symlink even if it's broken\n\n### What do you see instead?\n\nrmSync fails silently, and the broken symlink remains on disk.\n\n### Additional information\n\nNot sure if it is related to #58768 \n","author":{"url":"https://github.com/Yuchen-Dai","@type":"Person","name":"Yuchen-Dai"},"datePublished":"2025-12-11T08:21:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/61020/node/issues/61020"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:23d46d25-3723-8f1a-7d64-4c1b8637065f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87C6:265A7D:F5FBC5:14A21FB:6A4C4EEB |
| html-safe-nonce | c109b59637a18166c35b3bf8f655d4dfa700faeb43925af21ddca068c8b14591 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0M2OjI2NUE3RDpGNUZCQzU6MTRBMjFGQjo2QTRDNEVFQiIsInZpc2l0b3JfaWQiOiI5Mzc2ODcxNDg4NjA4MjEyMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0d9b7726991db633610b58c4394a52e8594c19e8059ab6beb32e42366547b499 |
| hovercard-subject-tag | issue:3718317572 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/61020/issue_layout |
| twitter:image | https://opengraph.githubassets.com/342897befb238edb1448ff8fad3afbbfd1972644c3dfa693e709bcbf44127193/nodejs/node/issues/61020 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/342897befb238edb1448ff8fad3afbbfd1972644c3dfa693e709bcbf44127193/nodejs/node/issues/61020 |
| og:image:alt | Version v24.12.0 Platform Microsoft Windows NT 10.0.22631.0 x64 Subsystem No response What steps will reproduce the bug? fs.rmSync() fail to remove broken symlinks. The same operation works correct... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Yuchen-Dai |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 65d78903193f110d7a9d1f8587c6dc3cb911aae0 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width