Commands.page Logo

Prevent Wget From Creating Orig Backup Files on Ubuntu

When downloading files with wget on Ubuntu, the utility automatically saves existing files with a .orig extension before overwriting them. This safety feature can clutter directories with duplicate backups when scripting or updating files repeatedly. This article explains the specific command-line flag required to disable this behavior and keep your download folders clean.

The flag that prevents wget from creating .orig backup files is –no-clobber, which can also be shortened to -nc. When this option is enabled, wget will check if the destination file already exists. If the file is present, wget will skip the download entirely rather than renaming the existing file and fetching a new copy.

To use this flag, append it to your standard wget command. For example, run wget -nc http://example.com/file.zip. This ensures that if file.zip is already in the directory, no action is taken and no backup file is generated. This is particularly useful for resuming downloads or running automated scripts where existing files should remain untouched.