---
name: "decomment"
section: "1"
platform: "linux"
package: "pmccabe"
version: "2.8-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/decomment"
---

# decomment(1)

remove comments from C and C++ files

## NAME

decomment - remove comments from C and C++ files

## SYNOPSIS

**decomment \[file(s)\]**

## DESCRIPTION

*decomment* processes the named files, or standard input if none are named, copying their contents to standard output with comments removed. Line numbers in the input file(s) and out file(s) are unchanged, that is, if `main()` occurs on line 40 in the input, it will also appear on line 40 in the output despite comment removal.

## APPLICATIONS

*decomment* may be used to remove comments in order to simply other programs which process source code.

## DIAGNOSTICS

No parsing-related diagnostics.

## WARNINGS

## AUTHOR

Paul Bame

## SEE ALSO

[*pmccabe*(1)](/pmccabe/1.md), [*codechanges*(1)](/codechanges/1.md)
