Minimizing Storage Usage on Jetson Xavier NX

I checked the link below for minimizing storage usage on Jetson Xavier NX with the command in the following:
$ sudo dpkg -r --force-depends “cuda-documentation-10-2” “cuda-samples-10-2” “libnvinfer-samples” “libvisionworks-samples” “libnvinfer-doc” “vpi1-samples”
capacity : 4.6GB → 5.8GB

After that, I would like to install new packages:
e.g. : $ sudo apt-get instatll libopenblas-base
But, I got the error:

The following packages have unmet dependencies:

cuda-toolkit-10-2: Depends: cuda-documentation-10-2 (>= 10.2.300) but it is not going to be installed

Depends: cuda-samples-10-2 (>= 10.2.300) but it is not going to be installed

libvisionworks-sfm-dev: Depends: libvisionworks-samples (>= 1.6.0) but it is not going to be installed

libvisionworks-tracking-dev: Depends: libvisionworks-samples (>= 1.6.0) but it is not going to be installed

nvidia-tensorrt: Depends: libnvinfer-doc (>= 8.2.1-1+cuda10.2) but it is not going to be installed

Depends: libnvinfer-samples (>= 8.2.1-1+cuda10.2) but it is not going to be installed

nvidia-visionworks: Depends: libvisionworks-samples (>= 1.6.0.501) but it is not going to be installed

nvidia-vpi: Depends: vpi1-samples (= 1.2.3) but it is not going to be installed

tensorrt: Depends: libnvinfer-samples (>= 8.2.1-1+cuda10.2) but it is not going to be installed

Depends: libnvinfer-doc (>= 8.2.1-1+cuda10.2) but it is not going to be installed

E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

However, I fixed this issue with the command:
$ sudo apt --fix-broken install
I also confirmed the smaller capacity(capacity: 5.8GB → 4.6GB)

So, could you please tell me the avoidance of this error without using the command above?

Do you have any updates?

Hi @H_Y,

Depending on what you need on the Jetson, you can remove the following components:

  • containerd docker*: if you don’t need containers
  • libreoffice thunderbird chromium-browser: if you don’t need to use these packages
  • ubuntu-gnome-desktop: GUI elements if you don’t need it

For uninstalling, you need apt purge. After this, you can use sudo apt-get autoremove to remove any package that is not longer needed because of dependencies. Be aware that this may mess up your Jetson and should be done before preparing your custom packages.

Another way is to compile a custom image for Jetson. You can use meta-tegra and Yocto for this purpose. For further reading:

Yocto-dev-summit-leon-anavi-2019.pdf (724.9 KB)

I hope this helps.

Best regards,
Leon

Hi, sorry for the late response.
Like Leon stated, sudo apt purge is preferred as it takes care of the dependency, however, it could also purge other packages that those target packages that you are trying to remove depend on.
I believe executing apt --fix-broken install is the best solution especially if you confirmed that it did not bring back the packages that you intended to remove.

Hi @luis.leon ,
Thank you for this reply.
I will refer to the advice.

Hi @cyato,
Thank you for this comment.