Search code examples
linuxcentospackagelinux-distro

A issue in linux package management


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

  1. if rpm takes care of the unwanted data and clear it, No issues
  2. if it wont is there a command to roll back to the initial state( i.e uninstalling the aborted installing packages).

Solution

  • 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:

    1. Create new to-do list using RPM package names from command line.
    2. Check prerequisite RPM packages. If any are missing add them to the to-do list.
    3. Repeat step #2 until all missing packages are identified and are accessible.
    4. Download all prerequisite RPM packages.
    5. If all prerequisite RPM packages have been cached do next step. Otherwise error out.
    6. Install prerequisite RPM packages in reverse order.
    7. Install the original target RPM package.

    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.