1

A couple of years ago I made a live-image for personal uses (a mixture of use cases) using debootstrap, chroot, and squashfs-tools

Now i want to re-design the distro, update the software in it, add some new software and debloat it a bit, starting with the package management

When I try to run:

$ apt remove apt dpkg

or

$ apt purge apt dpkg

, apt targets all the installed packages on the system, which is something that i don't want to happen: I want to keep all the software installed through apt, but also want get rid of all the package management and update mechanisms, which aren't necessary in a live-system

I tried searching for this on the internet, i also tried searching in Stack Overflow, Serverfault, and tried searching in this Stack Exchange site and none of the results had any information for what I need

1 Answers1

1

A number of packages depend on dpkg explicitly, because they need a specific version of dpkg. This means that you can’t easily remove it.

It should be possible to remove apt if you try to remove it on its own:

apt purge apt

dpkg provides a couple of utilities which may be required even on a live system, notably update-alternatives. If you’re sure you want to get rid of it, you can create an empty package to satisfy the dependency, using equivs.

In my experience package management tools are useful even on live systems, to be able to install packages which aren’t already part of the live system.

Stephen Kitt
  • 434,908
  • Not all live systems need package management. For example, System Rescue CD and RIPLinux, You don't use a package manager in those (RIPLinux doesn't even have a package manager inside AFAIK), you use the ready-to-use software in them – カルロサグ May 03 '23 at 17:53
  • You can however, leave the package management, so that updating the image is only a matter of extracting, updating through chroot and rebuilding, but nowadays with Appimages, there's no need for that in many cases, and most of the software i've been asked for, that goes off-topic with what the system is all about, is in the form of Appimages – カルロサグ May 03 '23 at 18:00