Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downloading package with apt-get when it's already installed on system

Tags:

debian

apt-get

How to download openssh package using apt-get?

The problem is that the package is already installed so I get only:

sudo apt-get install openssh -d
Reading package lists... Done
Building dependency tree... Done
openssh is already the newest version.

Because of being already installed, I don't get the debian package. I should remove it first, but then I would lose USB networking.

I know that this procedure is possible with aptitude, but it's not available for me.

like image 921
user44556 Avatar asked Oct 11 '10 07:10

user44556


People also ask

How do I download apt packages without installing?

Here is what you do: Remove any packages currently saved in the cache by running sudo apt clean . Include --download-only in the command, e.g: sudo apt install --download-only <NameOfPackage> . This also works for multiple packages, e.g: sudo apt install --download-only <package1> <package2> <package3>

How do I download a package with dependencies?

You can also download the dependencies for any package using the conda info command to first list all the dependencies for a specific package, and then copying those dependencies into a requirements. txt file. 2. Copy the list of dependencies, including version information into a requirements.

How do I fix the apt-get command not found?

After installing the APT package, check the /usr/bin/ directory to ensure if it had properly installed. If the file is empty, then run the locate apt-get command again. If no result is shown, there is no alternative but to reinstall the operating system. This might fix the problem.


1 Answers

sudo apt-get install openssh -d --reinstall

this will download the pacakge into /var/cache/apt/archives. however I think you probably mean "openssh-server" or "openssh-client" or "ssh" or something, there isn't an openssh pacakge in debian. You also might be interested in the "--print-uris" option if you are going to be scripting this.

like image 79
stew Avatar answered Nov 15 '22 23:11

stew