---
title: "Automating product deprecation"
description: "SCARF (Systematic Code and Asset Removal Framework) is Meta's tooling for deprecating products by removing dead code and unused data, credited with deleting over 100M lines of code in five years and petabytes of data across 12.8M data types in 21 systems in one year."
url: "https://swe.quest/articles/automating-product-deprecation-9c964f5b3db1d6d5"
canonical: "https://engineering.fb.com/2023/10/17/data-infrastructure/automating-product-deprecation-meta/"
source: "Meta Engineering"
published: "2023-10-17"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["refactoring","developer-productivity","static-analysis","developer-tools"]
---

# Automating product deprecation

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2023-10-17, 10 min read, Case study. Original: [https://engineering.fb.com/2023/10/17/data-infrastructure/automating-product-deprecation-meta/](https://engineering.fb.com/2023/10/17/data-infrastructure/automating-product-deprecation-meta/)

## Summary

SCARF (Systematic Code and Asset Removal Framework) is Meta's tooling for deprecating products by removing dead code and unused data, credited with deleting over 100M lines of code in five years and petabytes of data across 12.8M data types in 21 systems in one year. Engineers scope a deprecation by making only boundary decisions ("Flag Dependency" or "Add to Project"), and SCARF computes a daily-refreshed deletion roadmap that orders removals safely: mobile clients before GraphQL definitions, then business logic, schemas, and finally data. Static and dynamic usage signals block automated deletion of anything still in use. Engineers can triage or override those signals, for example deleting an endpoint that still gets trickle traffic, and generate targeted dependency-breaking code changes.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)
- [Static analysis](https://swe.quest/tags/static-analysis.md) (Engineering practices)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- dependency graphs
- large monorepo codebases ([easy posts on Version control](https://swe.quest/tags/version-control.md?difficulty=easy))

## Keywords

SCARF, Meta, GraphQL, Moments

## Related posts

- [Automating dead code cleanup](https://swe.quest/articles/automating-dead-code-cleanup-e03bc4ba07b5bf1c.md): Meta Engineering · 2023-10-24 · Medium · 7 min read · Static analysis, Refactoring & migrations, Developer productivity, Python
  Meta's SCARF framework finds dead code by building a cross-language, symbol-level dependency graph from Glean and augmenting it with runtime usage data such as API endpoint logs, URI dispatch tables and async job invocations, then garbage-collects unreachable nodes, subgraphs and cycles.
- [Automating data removal](https://swe.quest/articles/automating-data-removal-d163bb8b8352c57e.md): Meta Engineering · 2023-10-31 · Medium · 9 min read · Privacy, Databases, Static analysis, Refactoring & migrations
  Meta's SCARF framework includes a subsystem that finds and deletes unused classes of data, such as tables, storage use cases and TAO object types, across 21 data systems.
- [Protecting user data through source code analysis at scale](https://swe.quest/articles/protecting-user-data-through-source-code-analysis-at-scale-357585a0d96f83c8.md): Meta Engineering · 2025-02-18 · Medium · 4 min read · Static analysis, Threat detection, Application security, Python
  Meta's Anti-Scraping team encodes known scraping attack vectors as taint-analysis rules in its in-house static analyzers, Zoncolan for Hack and Pysa for Python, so potential vectors are flagged before code ships.
- [Tale of 'metadpata': the revenge of the supertools](https://swe.quest/articles/tale-of-metadpata-the-revenge-of-the-supertools-5db481304c48698d.md): Zalando Engineering · 2024-01-22 · Medium · 7 min read · Incidents & postmortems, Configuration management, Deployment, DNS, Cloud platforms
  A one-character typo turning the "metadata" key into "metadpata" in a YAML config caused Zalando's AWS account-management tool to treat the configuration as "no accounts" and then decommission all accounts.
- [Fixit 2: Meta’s next-generation auto-fixing linter](https://swe.quest/articles/fixit-2-meta-s-next-generation-auto-fixing-linter-71b7e5da0973759e.md): Meta Engineering · 2023-08-07 · Medium · 6 min read · Static analysis, Python, Developer tools, Refactoring & migrations, Open source
  Fixit 2 is a partial rewrite of Meta's open-source Python auto-fixing linter, built on LibCST so rules can safely suggest and apply code replacements without regex or broken syntax.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
