A method and apparatus for packaging and distributing software. Embodiments of the invention comprise a software packaging system that is portable across many platforms. Each package is self-contained in form of a single-file entity that comprises a payload file and a control file. The payload file is an archive file that contains a compressed collection of all the software files that are required for installation of the software package. The control file includes the necessary information for installation of the files contained in the payload file, in addition to other descriptive information used to determine the size, type, location of storage, and other useful attributes of a software package, even before it is installed on a system. Security measures have been implemented in the system to detect a package the contents of which have been tampered with. Embodiments of the invention can be utilized to install packaged software that is accessible via the Internet. A package on a remote source can be accessed and installed using a Uniform Resource Locator (URL) that indicates the package's specific address on the remote source. Embodiments of the invention are designed such that the entire system is small in size so that the storage space and the transmission bandwidth required for their storage or transportation are minimized. Embodiments of the invention may be used to install, remove or update a software package.