A rewrite of this article is being devised at Patch (computing)/Temp. Please comment or help out as necessary. Thanks
In computing, a patch is a software update meant to fix problems, bugs or the usability of a previous version of an application. This can include any computer program ranging from word processors to computer games to operating systems and web servers. The term probably originates from the Unix patch command by Larry Wall. Patching can be done to either the binary executable or a program's source code.
Patches, especially large ones, are sometimes called "service packs." Microsoft has so far released two service packs for its latest operating system, Windows XP.
Often a patch consists of an update to a program's executable—the program run by a user. The binary file is either modified to include the fixes or just completely replaced.
The sizes of patches vary. Some patches only modify the application itself, but some also alter or replace content. If a patch only alters the "executable," it can be very small (under a megabyte). If it also changes assets, it can be several megabytes in size. As noted above, often a patch will just replace the entire executable rather than attempt to "fix" the exisiting version of the executable.
Applying a patch used to be a tedious, error-frought process done by following an often ill-documented set of procedures. Missing or misapplying a step would usually result in having to re-install both the application and patch. Today, patch installtion is usually done automatically by special programs.
Historically, patches were distributed on paper tape or punched cards, and the recipient was expected to cut out the indicated part of the original tape (or deck), and patch in (hence the name) the replacement segment. Then they were distributed on magnetic tape. Then, after removeable disk drives had been invented, patches were obtained from the software developer via a disk or, later, CD-ROM via mail. Today, with almost ubiquitous Internet access, most patches are available only through download via the developer's web site.
Computer games often—almost ubiquitously today—require patches to fix compatibility problems after their initial release.
Several software manufacturers develop tools to aid in the patch application process. Pocket Soft makes RTPatch which only delivers changes to the software. WinZip has a self-extraction utility that will launch a program that can apply a patch.
Patches are sometimes needed to fix problems with libraries or portions of source code for programs that are used frequently or are in maintenance. This is a common practice on very large-scale software projects, but rare in small-scale development.
For example, during the early development of the Linux operating system, which is noted for publishing its complete source code, Linus Torvalds, the original author, received hundreads of thousands of patches from many programmers to apply against his original version. In projects like Linux, it is common that the authors receive patches or many people publish patches that fix particular problems or add certain funtionality, like support for local languages outside the project's locale.
A popular web server, Apache, evolved as a number of patches that a web master created to add some functionality. In fact, the name derived from the implication that it is a collection of patches ("A patchy server" → "Apache server").