DELAPARRA
Index
Color
NL
Category: CLI flags

--dry-run, -n (Dry Run)

Explained by Updated

What is --dry-run, -n (Dry Run)?

--dry-run, -n (Dry Run): Show what the command WOULD do without actually doing it. Critical safety flag for destructive operations. A dry run shows you what a command would change, without changing anything. The tool goes through the same steps, prints the files it would delete or the records it would update, and then stops.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about --dry-run, -n (Dry Run)

How is --dry-run, -n (Dry Run) used in practice?

Use it before anything you cannot undo. Before rsync --delete syncs a folder, before git clean removes untracked files, before a migration script touches a production database. Read the output first. If the list is longer than you expected, you have found the problem before it cost you anything.

What should you keep in mind with --dry-run, -n (Dry Run)?

Not every tool calls it the same thing. git clean -n, rsync --dry-run, kubectl apply --dry-run=client and terraform plan all do the same job. A dry run is only as accurate as the tool behind it, so a dry run that passes does not prove the real run will succeed. It does tell you what the tool intends to do.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.