How do apt or dnf package managers replace critical files?

20 views Asked by At

I was trying to copy some libraries into my shared library path and I accidentally replaced libc.so with a newer version by cp command and the whole system froze. restarted it and it was fine again. There are too many programs in Linux that use libc.so, and apparently replacing it (even with a newer version) could cause a stroke to the system.

So how do package managers like apt or dnf update/replace critical files like libc which many program depend on?

0

There are 0 answers