Last active
January 10, 2025 05:03
-
-
Save adujardin/c0ee25cfb343ea5b6d17ea88ec6634ac to your computer and use it in GitHub Desktop.
Script to remove unnecessary stuffs from the Jetson to save disk space (WIP)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
@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:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a clean alternative for Jetson Tx2 as well?