Back to Insights
Pain Points
10 min readNovember 23, 2026

How to Find Unused Fields in Salesforce (and Check Before You Delete Anything)

A field is unused only if it is both empty and not referenced. Measure population with a report or SOQL count, check references in layouts, flows, Apex, validation rules and reports, then verify nothing outside the org depends on it. Delete only after that check, in a sandbox first.

Tim Owens

Founder & CEO, Wrenk

Share:
Database fields cleanup and optimization visualization

Short answer: A field is "unused" only if it is both empty and not referenced. To find candidates, measure how often each field is populated (with a report or SOQL count), then check where each candidate is referenced: layouts, flows, Apex, validation rules, reports and integrations. Delete only after that check, in a sandbox first.


What "unused" means

Three conditions can make a field look unused, and they are not the same thing.

Empty: no record has a value in the field. Run a report or SOQL query that counts non-null values to find out.

Not referenced: the field is not used by layouts, validation rules, flows, process builders, Apex, formula fields, reports, dashboards, approval processes, duplicate rules, assignment rules, sharing rules, quick actions, or external integrations. Use "Where is this used?" in Object Manager, then search your metadata and code.

Not read by integrations: the field is not pulled by any middleware, BI tool, managed package, or external application. This is the hardest to verify because Salesforce cannot see what an external system does with its access.

A field can be non-empty but referenced nowhere (data exists but nothing uses it). A field can be empty but referenced in a flow that has never fired. And a field can be empty and unreferenced inside the org but still read by an integration you do not control. All three cases need investigation before you delete.


Step 1: Measure population

Start by finding which fields have data and which are empty.

Report method. Create a report on the object, group by the field, and count rows. If every record lands in the blank bucket, the field is empty. This works for most objects but can time out on large data volumes.

SOQL method. Run a count query in Developer Console, Workbench, or VS Code:

`SELECT COUNT() FROM Account WHERE My_Custom_Field__c != null`

For large objects (more than a few hundred thousand records), use a filtered query or batch Apex. If the count is zero, the field is empty. If the count is low relative to your record volume, the field may be unused but still holding legacy data that someone once entered.

Limits to watch. Reports and SOQL can time out or return only partial results on very large data sets. Query Performance Feedback in Setup can help you understand why.


Step 2: Check references inside the org

A field with no data can still be in use. Check these locations before you assume it is safe to delete.

Where is this used? Open the object in Object Manager, select the field, and click "Where is this used?" This shows references in layouts, flows, validation rules, reports, and some other metadata. It does not show every reference (Apex, for example, is not in the list).

Metadata API and Dependencies. The Metadata API and Tooling API expose dependencies programmatically. Third-party tools such as Salesforce CLI's `sf org list dependencies` and open-source utilities like HappySoup build on these APIs.

Search Apex and Flows. Search your Apex classes and triggers for the field's API name. Search Flow definitions (you can export them and search the XML) for the field. If your code or automation references the field, it is not unused.

Formula fields and roll-up summaries. If another field's formula or a roll-up summary references this field, you cannot delete it until you remove that reference.


Step 3: Check outside the org

Integrations, BI tools, and managed packages can read fields that nothing inside the org uses.

Integrations. List every middleware, ETL, and custom integration. For each, ask: does this pull this object? If so, does it pull all fields or specific fields? A middleware pulling "all fields" may break if you delete one it mapped.

BI and exports. Scheduled reports, Data Loader exports, and BI tools connected to the org may reference fields you plan to delete. Check their configurations.

Managed packages. A managed package may read fields on standard or custom objects in your org. Check the package's documentation or contact the vendor before deleting a field.

If you do not own or control the integration, ask its owner to verify that the field is not in use.


Step 4: Stage the removal

Do not delete the field immediately. Stage the change to catch anything you missed.

Deprecate. Rename the field's label to include "DEPRECATED" or similar. This signals to users and developers that it is marked for removal.

Hide. Remove the field from page layouts and permission sets so users cannot see or enter data. Leave it on the object for now.

Wait one business cycle. A monthly close, quarterly review, or integration run may reference the field. Wait long enough for those processes to run while the field is hidden, and monitor for errors.

Delete in a sandbox first. Deploy the deletion to a sandbox and run your integration tests, flows, and reports. If anything fails, you found a reference you missed.

Keep a metadata backup. Export the field's metadata before deleting it in production. If you need to restore, you can redeploy the metadata and use Data Loader to reload any data you exported.

Deletion and recovery. Salesforce holds a deleted custom field and its data for 15 days. During that time, you can restore it from Setup → Object Manager → [Object] → Deleted Fields. After 15 days, the field and its data are permanently deleted.


Tools that help

Several free and commercial tools automate parts of this process.

FieldRat is a free AppExchange app from Passage Technology that shows field usage across page layouts, reports, and other metadata.

Jetstream is a free, open-source Salesforce toolkit that includes a field usage analyzer and bulk metadata tools.

Field Trip is a paid AppExchange app from Metazoa that provides detailed field usage reports and helps plan field cleanup.

These tools supplement the native "Where is this used?" feature; none of them can see what external integrations read.


FAQ

How do I find unused custom fields in Salesforce?

Measure population with a report or SOQL count. Then check "Where is this used?" in Object Manager, search your Apex and Flows for the field's API name, and ask integration owners whether they pull the field. A field is unused only if it is empty and not referenced anywhere.

Is it safe to delete an empty field?

Not automatically. An empty field can still be referenced by flows, validation rules, reports, or integrations that have not run yet. Check all references before you delete.

How can I see where a field is referenced?

Open Object Manager, select the field, and click "Where is this used?" For Apex, search your codebase for the field's API name. For integrations, ask the integration owner.

What happens to data when I delete a custom field?

Salesforce keeps the deleted field and its data for 15 days. You can restore it from the Deleted Fields list during that time. After 15 days, the data is permanently deleted.

Does Salesforce Health Check show unused fields?

No. Salesforce Health Check evaluates org-wide security settings such as password policies, session settings, and MFA. It does not audit data quality, unused fields, or metadata usage.


CTA

Want a quick read on your org's overall health? The free health check is a short questionnaire that gives a peer-benchmarked score from three answers. Up to ten answers refine it, and you can stop any time. Results appear on the page; no signup and no sales call. The questionnaire does not score performance or technical debt, but the page notes that unused fields and objects are part of "Technical Debt."

Run the free health check →


Sources

  • Salesforce Help: "Where is this used?" in Object Manager
  • Salesforce Help: Manage Deleted Custom Fields
  • Salesforce Help: Delete a Custom Field
  • Salesforce Help: Security Health Check (confirms it covers security settings, not field usage)
Tags:
salesforce
custom-fields
field-usage
data-cleanup
metadata

Enjoyed this article?

Get more insights on SaaS management, AI automation, and RevOps strategy delivered weekly.