Debian packages contain control files in which dependency information is recorded.
The control files are checked by dpkg when installing packages in order to make sure that these dependencies are satisfied. If dependencies are not satisfied, dpkg will refuse to install the package and print error messages indicating which packages need to be installed first. Dependency information is also checked by dpkg when attempting to remove a package in order to avoid disabling one or more packages which depend on the one being removed. In many cases, a package may depend on specific versions of other packages. For example, the current version of the interaction automation package expect depends on versions greater than or equal to 8.0.4 of both tcl.8.0 and tk8.0 .