Packaging requirements add size to the image. One way to reduce the size of the image is to remove all the packaging requirements from the image. This reduction includes both removing the package manager and its unique dependencies as well as removing the package management data itself.
To eliminate all the packaging requirements for an image, follow these steps:
Put the following line in your main recipe for the image to remove package management data files:
ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ;
For example, the recipe for the
core-image-minimal
image contains
this line.
You can also add the line to the
local.conf
configuration file.
Be sure that "package-management" is not
part of your
IMAGE_FEATURES
statement for the image.
When you remove this feature, you are removing the
package manager as well as its dependencies
from the root filesystem.