Storage Optimization

Jetson provides flexible storage options/configurations for development, but some of the Jetson modules are equipped with a limited eMMC flash memory storage size for more cost-conscious, large-scale product deployment.

Initially, it might seem impossible to fit your applications and necessary libraries in the limited storage space, especially with the full set of JetPack, BSP, and all the development software that NVIDIA has prepackaged for Jetson.

Table 1. Disk Usage in the Original Configurations

JetPack 5.0.1 DP (Rel 34.1.1)/

Jetson AGX Orin Developer Kit

JetPack 4.6.2 (Rel 32.7.2)/

Jetson AGX Xavier Developer Kit

JetPack 4.6.1 (Rel 32.7.1)/

Jetson Xavier NX Developer Kit

{Original) Regular L4T [[a]]

6.1 GB

5.5 GB

[Original] Full JetPack [[A]]

16.6 GB

11.6 GB

11.6 GB

However, you can cut down on disk usage by removing unnecessary packages, libraries, and other assets. Table 2 shows how you can reclaim more than 8 GB of storage space on some of the latest JetPack versions.

Table 2. Disk Usage in an Optimized Deployment Configuration

JetPack 5.0.1 DP (Rel 34.1.1)/

Jetson AGX Orin Developer Kit

JetPack 4.6.2 (Rel 32.7.2)/

Jetson AGX Xavier Developer Kit

JetPack 4.6.1 (Rel 32.7.1)/

Jetson Xavier NX Developer Kit

Example deployment configuration

8.3 GB

5.2 GB

5.3 GB

In this section, there are simplified steps to minimize the disk usage on your Jetson device tips about how to analyze disk usage, the commands, and the example outputs from the different JetPack versions. There is also information about how to check whether an AI application is still working functionally under the slimmed-down configuration.

Identifying Current Disk Usage

The jetson-min-disk documentation shows you how to analyze the current disk usage, identify the files and directories that take up the space, and clarify the package dependencies. The documentation also provides some example outputs for JetPack 4.6.x and JetPack 5.0.x, so that you can assess how much disk usage you can remove for your application.

Minimized Configurations

The following graphic provides an overview of the minimal configurations. The jetson-min-disk documentation introduces multiple configurations ([A] to [D]) for different development and product needs.

../../_images/DiffMinConfigs.png

The following sections provide information about how you can regain disk space.

Removing the Desktop Graphical User Interface

If you know your system does not require a graphical user interface (GUI) on the Jetson native display output through HDMI, DP/eDP, or LVDS, You can remove ubuntu-desktop. Refer to Step 1: Removing GUI for more information.

Table 3. Disk Space Regained in a Typical Setup by Removing the Desktop GUI

JetPack 5.0.1 DP (Rel 34.1.1)/

Jetson AGX Orin Developer Kit

JetPack 4.6.2 (Rel 32.7.2)/

Jetson AGX Xavier Developer Kit

JetPack 4.6.1 (Rel 32.7.1)/

Jetson Xavier NX Developer Kit

Removing the GUI.

3.4 GB

5.5 GB

4.2 GB

To remove the the desktop GUI, run the following commands:

$ sudo apt-get update
$ sudo apt-get purge $(cat apt-packages-only-in-full.txt)
$ sudo apt-get install network-manager
$ sudo reboot

Removing the Documentation and Samples Package

If you installed the complete set of JetPack components (libraries and SDKs) by using the sudo apt install nvidia-jetpack command or by using SDK Manager to install everything, you might have packages that you do not need for your application.

Documentation and samples packages are some of the safest to remove, so you can start by uninstalling them. For more information, see Removing Docs and Samples Package.

Table 4. Disk Space Regained in a Typical Setup by Removing Documentation and Sample Packages

JetPack 5.0.1 DP (Rel 34.1.1)/

Jetson AGX Orin Developer Kit

JetPack 4.6.2 (Rel 32.7.2)

Jetson AGX Xavier Developer Kit

JetPack 4.6.1 (Rel 32.7.1)/

Jetson Xavier NX Developer Kit

Removing docs and samples.

0.8 GB

1.2 GB

1.1 GB

To remove the documentation and sample package, run the following command:

$ sudo dpkg -r --force-depends "cuda-documentation-10-2" "cuda-samples-10-2"
"libnvinfer-samples" "libvisionworks-samples" "libnvinfer-doc" "vpi1-samples"

Removing Dev Packages and Static Libraries

When you finish building your applications, you do not need dev packages that provide header files and static libraries. You can remove the packages after checking how much disk space each package takes up. For more information, see Step 3: Removing Dev Packages/Static Libraries.

Table 5. Disk Space Regained in a Typical Setup by Removing Dev Packages

JetPack 5.0.1 DP (Rel 34.1.1)

Jetson AGX Orin Developer Kit

JetPack 4.6.2 (Rel 32.7.2)

Jetson AGX Xavier Developer Kit

JetPack 4.6.1 (Rel 32.7.1)

Jetson Xavier NX Developer Kit

Removing static libraries.

4.8 GB

2.1 GB

2.2 GB

To remove the static libraries, run the following command:

$ sudo dpkg -r --force-depends $(dpkg-query -Wf '${Package}\n' | grep -E
"(cuda[^ ]+dev|libcu[^ ]+dev|libnv[^ ]+dev|vpi[^ ]+dev)")

Starting with a Minimal Jetson Linux BSP

If you are using a host x86-64 Linux host machine to flash your Jetson, you can create a minimal configuration RootFS and flash that image on Jetson.

Refer to Option: Minimal L4T for more information about building the minimal Jetson Linux RooFS image.

Verification

Refer to Verification for more information about using the NVIDIA DeepStream reference app as a typical AI application to verify the minimally configured Jetson environment.

To verify your content, run the following command:

git clone https://github.com/NVIDIA-AI-IOT/jetson-min-disk/
cd jetson-min-disk
cd test-docker
./docker-run-deepstream-app-overlay.sh