How to download packages in Linux with dependencies without installation

  • Last updated: Nov 22, 2024
  • Views: 22
  • Author: Admin

Linux operating systems use packages to manage software, which often have complex dependencies. However, there are cases when you just need to download a package with its dependencies without installing it directly, for example, for later use on another machine or in an isolated environment.

In this article, we will look at how to download Linux packages with dependencies without installing them using the YUM package manager.

 

The example command downloads the MariaDB-server database server packages, but does not install the packages after downloading.

$. yum install MariaDB-server --downloadonly --downloaddir=/root

linux downloadonly

Command descriptions:

  • yum install - Command to install packages using YUM package manager.
  • MariaDB-server - The name of the package to download. In this case, it is the MariaDB database server.
  • --downloadonly - An option that tells YUM not to install the package, but only to download it.
  • --downloaddir - The directory where the downloaded package and all its dependencies will be saved. In this example, the packages will be saved to the /root directory.

As a result, the command will download the MariaDB-server package and all its dependencies required for installation to the specified /root directory. However, the packages themselves will not be installed on the system.


 

Ultimately, the ability to download packages with dependencies without installing them is a very useful tool that can be useful in a number of scenarios: when working in isolated environments, for offline installation on another machine, or for examining the composition of a package.

 

SIMILAR ARTICLES