The invention relates to a method and apparatus for packaging products, such as vegetables and fruits, utilizing a sorting machine which method includes the steps of determining per product the characteristics of the respective products, such as, for instance, determining their weight and/or their shape; comparing the characteristics with predetermined packaging requirements; on the basis of this