---
name: "cg-clean"
section: "1"
platform: "linux"
package: "cogito"
version: "0.18.2-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/cg-clean"
---

# cg-clean(1)

remove untracked files from the working tree

## NAME

cg-clean - remove untracked files from the working tree

## SYNOPSIS

cg-clean \[-d\] \[-D\] \[-n\] \[-q\] \[-x\].sp

## DESCRIPTION

Cleans file and directories that are not under version control. When run without arguments, files ignored by [**cg-status**(1)](/cg-status/1.md) and directories are not removed..sp

## OPTIONS

- \-d

  Also clean directories and their contents.

- \-D

  Same as -d but try harder (change permissions first).

- \-n

  Do not actually remove the files, just pretend to do so.

- \-q

  Quiet - don't report what's being cleaned.

- \-x

  Also clean files ignored by [**cg-status**(1)](/cg-status/1.md), such as object files.

- \-h, --help

  Print usage summary.

- \--long-help

  Print user manual. The same as found in [**cg-clean**(1)](/cg-clean/1.md).

## COPYRIGHT

Copyright © Pavel Roskin, 2005.sp

## SEE ALSO

cg-clean is part of [**cogito**(7)](/cogito/7.md), a toolkit for managing [**git**(7)](/git/7.md) trees..sp
