LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-01-2019, 03:33 AM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Rep: Reputation: 23
apt-get install updates


Hello,

I have an ubuntu 16.4 which is offline.
and another PC installed with the same version which is online.
In the online PC I want to run:
apt-get install updates

and then install the package on the offline PC.

How can I do it ?

Thank you,
Zvika
 
Old 03-01-2019, 08:22 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,363

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
Quote:
apt-get install updates
I don't think that syntax is correct.
apt-get update - installs the updated lists of what's available
apt-get upgrade installs updates which debian, for reasons of it's own, refer to as 'upgrades'

Presuming the 2 machines are in synch presently, I would use the online machine, run sudo apt-get update, and then when you run 'sudo apt-get upgrade' it spits out a line or many lines of what's going to be upgraded. RETAIN THAT INFORMATION!

Now there's some option (maybe in dpkg) that allows you to download the packages. You can get them on a usb key, carry them over and manually install/upgrade them. There's also documents on creating your own repo
 
Old 03-01-2019, 08:46 AM   #3
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052
apt-get install updates

You are better off downloading the latest isos. Either burn them to DVD or USB stick. Mount them on the offline machine and point Apt to the iso as a local source. That is how I did it for years.

If you have multiple machines that require an update, create a local http mirror on your LAN with the online box, and then point the offline boxen to that mirror.

Both options will allow you to receive updates and satisfy all dependencies. If you try to copy just a few packages at a time, you will end up doing so many times for a system update. Big time sink IMHO.
 
1 members found this post helpful.
Old 03-01-2019, 11:11 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
you need to put the packages (files) to that offline host somehow. What is the preferred way to do that?
 
Old 03-02-2019, 02:36 AM   #5
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Make a archives folder in a USB key, and a lists folder.

I usually copy all the packages from the online machine's /var/cache/apt/archives directory, and all the lists from /var/lib/apt/lists directory onto USB key, delete the list files in the offline machine's /var/lib/apt/lists directories, then copy the packages and list files off the USB into the same directories of the offline machine and just issue command: sudo apt-get upgrade. No need to do the: sudo apt-get update command as the list files are up to date.

Just don't try copying the lock files and partial/aux folders from those directories, only .deb packages and list files. And don't delete the lock file/folders in the offline machine's directories.

And to install stuff on the offline, I use synaptic on the online machine selecting "download only" after hitting "Apply", then again, transfer the packages to the offline to upgrade/install. Since my offline uses different version of Nvidia drivers, I always check if the version number changed in Synaptic to determine if I need to get the latest version, simply right clicking "mark for install" of the appropriate nvidia-driver downloads everything needed for the offline to upgrade nvidia.

Last edited by Brains; 03-02-2019 at 02:58 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to run this command "sudo apt-get install libdevil-dev" even after trying "apt-get -f install" getting below error message srihariu1 Linux - Embedded & Single-board computer 2 04-26-2018 06:33 AM
Is there knoppix-like distro, that we can: apt-get update; apt-get install programs ? frenchn00b Linux - Distributions 7 04-28-2008 02:06 PM
LXer: Apt-get remove SUSE; apt-get install Etch LXer Syndicated Linux News 0 05-26-2007 07:46 PM
Question about 'apt-get upgrade' versus 'apt-get install' eur0dad Red Hat 8 07-16-2006 05:41 PM
apt-get install not working / apt-get update is ok remy215 Debian 2 10-01-2005 07:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration