Containers are sorted according to whether they or their contents are contaminated with permissible or impermissible substances; in the process gas from the container or the environment immediately round the contents is examined by at least two analytical methods which produce at least one measured value each, and the sorting procedure is a function of at least two such values.