← All questionsRisingTech debt and legacy

How do we clean up a codebase full of inconsistent layers and old cruft?

You are not the only one. Asked 7 times since July 2026, 5 of them in the last 4 weeks.

Read what people asked

Times asked per week

9 Sept – 1 Dec
Week of 9 SeptTimes asked0Week of 16 SeptTimes asked0Week of 23 SeptTimes asked0Week of 30 SeptTimes asked0Week of 7 OctTimes asked0Week of 14 OctTimes asked0Week of 21 OctTimes asked0Week of 28 OctTimes asked0Week of 4 NovTimes asked0Week of 11 NovTimes asked01Week of 18 NovTimes asked14Week of 25 NovTimes asked4
Week of 9 SeptWeek of 25 Nov

Coloured columns are the last 4 weeks.

What people answer

  • One saysRecord why a workaround exists, what depends on it, the conditions for removing it and who owns revisiting it, instead of leaving vague 'temporary' comments.
  • One saysFind dead code by combining import-graph reachability with git history, since linters only catch unused code within a single file, and confirm each lead with a string search before deleting.
  • One saysInconsistent layers build up when a new lead lacking the original architect's context unintentionally starts a new style, especially on small long-lived teams in complex domains like identity, permissions or payments.
  • One saysAim for code that is safe to change and easy to understand later, not just code that works and passes tests.
  • One saysIgnore bulk formatting commits (for example via a blame-ignore file) so that code age reflects real changes.

Named in the answersgit logripgrepRuff F401no-unused-varsnoUnusedLocalsrepowise

A language model summarised 4 public replies and posts. Views are mixed. These are other people's views, not advice from Navigara.

What people asked

Each line is our one-sentence summary. The link opens the original discussion.

Show 3 more

Where it is asked

  • dev.to3
  • Stack Exchange1
  • Hacker News1
  • lethain.com1
  • A private community1

Private messages are counted, never shown. That is why you can read 6 of them.

Goes straight to the person who runs this site. No account needed.