upx
Compress executable files for distribution
TLDR
Compress executable
SYNOPSIS
upx [-d] [-t] [-l] [--best] [-1..-9] [options] files
DESCRIPTION
upx (Ultimate Packer for eXecutables) compresses executables. Compressed programs decompress in memory when run.
Compression reduces file size significantly, often 50-70% for binaries. This saves disk space and download bandwidth.
The compressed executable is self-extracting. It decompresses to memory at load time without user intervention.
Multiple executable formats are supported: Linux ELF, Windows PE, macOS Mach-O, and others.
Decompression is fast with minimal runtime overhead. The original executable behavior is preserved exactly.
Testing verifies compressed files are valid. This catches corruption before deployment.
PARAMETERS
-1 to -9
Compression level (1=fast, 9=best).--best
Best compression.--brute
Try all methods (slow).-d
Decompress.-t
Test integrity.-l
List compression info.-k
Keep backup file.-o FILE
Output to file.-f
Force compression.-q
Quiet mode.-v
Verbose mode.--no-backup
Don't create backup.
CAVEATS
Some security tools flag UPX-compressed files. Code signing may be invalidated. Slight startup overhead from decompression. Some formats not supported.
HISTORY
UPX was created by Markus Oberhumer and László Molnár in 1996. It became the standard tool for executable compression, widely used for software distribution.
