LinuxCommandLibrary

dpkg-split

Split large Debian packages into smaller files

SYNOPSIS

dpkg-split [-csize] infile [filename]

PARAMETERS

-csize
    Specifies the maximum size (in bytes) for each split file. size can be specified with K, M, or G suffixes to denote kilobytes, megabytes, or gigabytes, respectively. If not specified, it defaults to 2047 KiB. Note that due to the overhead of debian packages (ar header, debian-binary file), the actual split filesize can exceed the selected size by a few bytes.

infile
    The path to the Debian package file (.deb) that you want to split.

[filename]
    The base filename for the split parts. If omitted, the base name is derived from the input file name.

DESCRIPTION

The dpkg-split command is a utility for splitting large Debian package files (.deb) into smaller, more manageable parts. This is useful for transferring large packages across networks with size limitations or for storing them on media with limited capacity, such as floppy disks (in ancient times). The command creates a series of files with numeric extensions, each representing a fragment of the original package. These fragments can be reassembled later using dpkg-join. The original debian package is not touched. dpkg-split helps to manage large packages in resource constrained environments or facilitate transportation across networks with size limits.

While less common now due to increased network bandwidth and larger storage capacities, dpkg-split remains a relevant tool in certain scenarios, such as when dealing with embedded systems or older infrastructure.

CAVEATS

The split files must be reassembled in the correct order using dpkg-join. Ensure that you have sufficient disk space to store both the original package and the split parts before running dpkg-split. The specified size can exceed by some bytes due to ar header, control file and debian-binary file.

EXAMPLES

To split 'mypackage.deb' into parts of 1MB each, use: dpkg-split -c1M mypackage.deb
The output would result in files named `mypackage.deb.001`, `mypackage.deb.002`, etc.
To split `mypackage.deb` using default parameters: dpkg-split mypackage.deb

SEE ALSO

dpkg-join(1)

Copied to clipboard