xref: /curl/docs/cmdline-opts/remove-on-error.md (revision 2abfc759)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: remove-on-error
5Help: Remove output file on errors
6Category: output
7Added: 7.83.0
8Multi: boolean
9See-also:
10  - fail
11Example:
12  - --remove-on-error -o output $URL
13---
14
15# `--remove-on-error`
16
17Remove output file if an error occurs. If curl returns an error when told to
18save output in a local file. This prevents curl from leaving a partial file in
19the case of an error during transfer.
20
21If the output is not a regular file, this option has no effect.
22