Post APsH3NVEmprAMkYP2G by jackie@social.linux.pizza
 (DIR) More posts by jackie@social.linux.pizza
 (DIR) Post #APry04Jpl1DKs0vcMS by jselea@blogs.linux.pizza
       2022-11-22T17:51:14Z
       
       2 likes, 2 repeats
       
       Have you ever installed packages from third party repositories to later realize that it was not the best idea? No? Well – I have.But from now on, I wont do it. And instead utilize chroot!In this section, we'll cover how to create a Debian-chroot on your Debian-based system (yes, this works on Ubuntu aswell).Install the package debootstrapapt update; apt install debootstrapNow, create a catalogue anywhere of your choosing, for example in /srvmkdir /srv/chrootGreat. Now depending on what you want. Perform any of the following:debootstrap bullseye /srv/chroot http://ftp.us.debian.org/debiandebootstrap  jammy /srv/chroot http://archive.ubuntu.com/ubuntuYou should see it pull down all the packages needed for the distro to start, and when it is complete – you can enter the chroot:chroot /srv/chrootThat's it! Now you can install, test or compile your packages as usual.And when you are done, you can simply remove the catalogue and start fresh – if you want.
       
 (DIR) Post #APs34UtfNms2EHcUeu by vhns@shitposter.club
       2022-11-22T18:54:07.020703Z
       
       0 likes, 0 repeats
       
       @jselea feel free to use systemd-nspawn as well, in case you need services to run within that chroot.
       
 (DIR) Post #APsH3NVEmprAMkYP2G by jackie@social.linux.pizza
       2022-11-22T19:33:44Z
       
       0 likes, 0 repeats
       
       @jseleanice post! my preferred solution to that issue is nix-shell e.g. nix-shell -p package-name
       
 (DIR) Post #APsH3Nyf1RONq0Jttg by selea@social.linux.pizza
       2022-11-22T21:30:17Z
       
       0 likes, 0 repeats
       
       @jackie nix-shell is nice, but only used it once :)@jselea