-
-
Save adujardin/c0ee25cfb343ea5b6d17ea88ec6634ac to your computer and use it in GitHub Desktop.
# https://elinux.org/Jetson/FAQ/BSP/RootFS_Reduction#Remove_installed_deb_packages | |
## Step 1, safe | |
sudo apt update | |
sudo apt autoremove -y | |
sudo apt clean | |
sudo apt remove thunderbird libreoffice-* -y | |
## Step 2, still safe but not recommended for dev use | |
# 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 | |
# 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 3, WARNING! 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 | |
# remove static libs (maybe cleaner to remove the "dev" packages instead) | |
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 |
Thanks a lot @adujardin
Thanks @adujardin - now I have a much cleaner mini server!
@karanjakhar @adujardin @skip007
Better than this is to have a custom image like this or this. If you need a server image, size will be reduced from 7GB+ to 2GB. All unnecessary NVIDIA junk removed, huge amounts of process time and memory saved.
Is there a clean alternative for Jetson Tx2 as well?
@visheshv I don't know. Try check if the jetson linux supports the Tx2 model. My image was created simple following the BSP tools for a sample filesystem (scripts nv_build_samplefs.sh and nvubuntu_samplefs.sh). There should be somewhere another sample file system and jetson-linux bsp for jetson tx2 I suppose.
@visheshv from here it says it is supported. So I recommend you follow the instructions from the tutorials above except that you must ADAPT it. Try exploring the BSP folder of tool scripts for your tx2 to figure out which parameters to use to create the image for your tx2 model. Once the image is created flashing it to a sd card should be the same I suppose.
For anybody finding this gist, check out the official documentation for this:
Thanks @adujardin