---
title: Unused Local Variable
description: "**Impact area** Manageability **Severity** Low **Affected element** Apex Class ## Rule ID SF-UNUSED-VAR ## Impact Increase the effort needed to read and understand source code. Remediation Remove the variable. ### Time to fix 10 min ## References This rule is…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/pmd-rules/unused-local-variable/"
updated: "2025-03-21"
category: PMD Rules
---

# Unused Local Variable

**Impact area**

Manageability

**Severity**

Low

**Affected element**

Apex Class

## Rule ID

SF-UNUSED-VAR

## Impact

Increase the effort needed to read and understand source code.

Remediation

Remove the variable.

### Time to fix

10 min

## References

This rule is linked to [UnusedLocalVariable](https://pmd.github.io/pmd/pmd_rules_apex_bestpractices.html#unusedlocalvariable)
