Ajeet Raina I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I am a maintainer of Collabnix blogging site. I work for Docker as a full-time employee. I run Collabnix Community Slack with over 6500+ audience . We have built a popular projects like Docker Labs, KubeLabs, KubeTools and DockerTools. You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)

Easy way to free up Jetson Nano SD card disk space by 40%

1 min read

The NVIDIA® Jetson Nano Developer Kit is a great way to get started with AI. It is a small, powerful computer that lets you run multiple neural networks in parallel for applications like image classification, object detection, segmentation, and speech processing. All in an easy-to-use platform that runs in as little as 5 watts.

Last week, I wanted to run NVIDIA DeepStream software in a Docker container on top of Jetson Nano. To my surprise, I found that the only SD card available was 16GB in size. Then I realized that I hardly got 291 MB space left on my device.

 df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   15G   14G  291M  98% /
none            947M     0  947M   0% /dev
tmpfs           986M   40K  986M   1% /dev/shm
tmpfs           986M   44M  943M   5% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           986M     0  986M   0% /sys/fs/cgroup
tmpfs           198M   20K  198M   1% /run/user/1000
 

Luckily, I was able to solve this problem. Here’s what I followed to free up some disk space in NVIDIA Jetson Nano.

Step 1. Update the existing repo

sudo apt update
 

Step 2. Remove unnecessary packages

sudo apt autoremove -y
 

Step 3. Clean up your repo

sudo apt clean
 

Step 4. Remove Libreoffice related packages

sudo apt remove thunderbird libreoffice-* -y
 

Step 5. Remove samples

 

sudo rm -rf /usr/local/cuda/samples \
/usr/src/cudnn_samples_* \
/usr/src/tensorrt/data \
/usr/src/tensorrt/samples \
/usr/share/visionworks* ~/VisionWorks-SFM*Samples \
/opt/nvidia/deepstream/deepstream*/samples

Step 6. Remove local repos

sudo apt purge cuda-repo-l4t-local libvisionworks-repo -y
sudo rm /etc/apt/sources.list.d/cuda*local
 /etc/apt/sources.list.d/visionworks*repo*
sudo rm -rf /usr/src/linux-headers-*

Step 7. Remove GUI

sudo apt-get purge gnome-shell ubuntu-wallpapers-bionic light-themes chromium-browser* libvisionworks libvisionworks-sfm-dev -y
sudo apt-get autoremove -y
sudo apt clean -y

Step 8. Remove static libs

sudo rm -rf /usr/local/cuda/targets/aarch64-linux/lib/.a \
/usr/lib/aarch64-linux-gnu/libcudnn
.a \
/usr/lib/aarch64-linux-gnu/libnvcaffe_parser*.a \
/usr/lib/aarch64-linux-gnu/libnvinfer*.a \
/usr/lib/aarch64-linux-gnu/libnvonnxparser*.a \
/usr/lib/aarch64-linux-gnu/libnvparsers*.a

Woah! I was able to install NVIDIA DeepStream 6.0 on my 16GB SD card.

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I am a maintainer of Collabnix blogging site. I work for Docker as a full-time employee. I run Collabnix Community Slack with over 6500+ audience . We have built a popular projects like Docker Labs, KubeLabs, KubeTools and DockerTools. You can follow me on Twitter(@ajeetsraina) & GitHub(@ajeetraina)

What is a Dockerfile – A Step-By-Step Guide

A Dockerfile is a text file which contains a series of commands or instructions. These instructions are executed in the order in which they...
Ajeet Raina
21 min read

Docker Desktop for Linux,  Docker Extensions and more with…

Docker Desktop 4.8.2 is now available for download for Mac, Windows and Linux. Here are the major highlights: Docker Desktop for various Linux distributions made available for the first...
Ajeet Raina
1 min read

Leave a Reply