so when a program is being installed and 2 out of 4 libraries are installed and a error shows up and the system aborts the installation. Will package manager automatically remove those 2 libraries? I am working on Cent OS
The installation of your target RPM package will not even start unless all the prerequisites required by the package are available or installable. The steps are similar to:
Note that all missing RPM packages are downloaded into a cache before any RPM packages begin to be installed.
So, if step #6 is interrupted, some packages may be installed and others not. No problem, rerun the RPM install and the set of already-installed packages will be larger, the number of outstanding packages will be smaller.