How to remove libreoffice from sample rootfs?

Hi Sir/Madam,

I try to use chroot and the following commands to remove libreoffice packages but it has some dependence issues.

sudo apt-get remove --purge libreoffice*
sudo apt clean
sudo apt-get autoremove

The logs as attach

After flashing the device, the first time bootup shows

The package system is broken
check if you are using third party repositories. if so disable them, since they are a common source of problems.
Futhermore run the following command in a Thermal: apt-get install -f
Details
The following packages have unmet dependencies
(Empty)

Actually, the libreoffice has been removed but I am afraid there is other dependencies side effect.
The dependence problem seems caused by python3-uno. I also tried “sudo apt-get remove --purge python3-uno libreoffice*” but the result is the same.

Can’t remove python3-uno, libreoffice-common, libreoffice-core from sample rootfs by chroot but it’s no problem to do in system.

Is there other correct way to remove libreoffice from sample rootfs.

Thanks
from_Jason.zip (13.3 KB)

Found the solution

need to mount /proc, /sys and /dev to rootfs

[url]https://wiki.archlinux.org/index.php/chroot[/url]

Another option is to configure the rootfs the way you want it on the device, then take a snapshot with cpio / gzip and use that as your rootfs base when you build a new image.

On the Jetson:

$ sudo -i
# cd /
# find . -xdev -depth -print | cpio -o | gzip | ssh me@my-host.wherever sh -c 'cat > /var/tmp/my-snapshot.cpio.gz'

The benefit of this option is that you can install and uninstall whatever you want, and configure whatever files you want (autostart, shellrc, editors, etc) and have it part of your root image.

No chroot needed, btw.