there are a lot of packages that remove nothing, nothing will happen and you can safely use the system
quite right - from your point of view.
from someone else's point of view it is enough, for example, only a bootloader (to load the linux program), the linux program and some kind of interactive shell built statically. It will be impossible to extract any benefit from such an “operating system”, but, formally, a computer will work and even somehow react to the entered information.
if you know exactly which packages you do not need, just delete them. Here you get the minimum you need.
The key point in your reasoning is: “nothing will happen.” Yes, after removing the next package, most likely nothing will happen. just the operating system will lose some of its functions. if you do not need these functions, feel free to remove such packages.
moved from comments
I would like a finished method
There is a “ready” way to meet your requirements:
- remove the package that you consider "unnecessary."
- check if what you need works. if not working, return the previous saved state.
- repeat from step 1.