-2

What is difference between apt-get install update and apt-get update? Also apt-get install update not working for me, don't know why.

output of apt-get install update

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package updat

some lines of output of apt-get update

Ign:2 http://ppa.launchpad.net/cassou/emacs/ubuntu xenial InRelease            
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                   
Get:4 http://linux.dropbox.com/ubuntu wily Release [6,596 B]                   
Hit:5 http://ubuntu-archive.mirror.serveriai.lt xenial InRelease               
Hit:6 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease    
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:9 http://repo.mysql.com/apt/ubuntu xenial InRelease                        
Ign:10 http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial InRelease

Is it okay, if i use apt-get update instead?
Thank you, Peace.

PS :- I'm using 16.04 LTS.

DKP
  • 153
  • The duplicate question talks about the apt-get command which is the predecessor to the apt command. But they are the same. – Terrance Jan 06 '17 at 06:43
  • I was wondering just about apt-get install update and apt-get update. Didn't think of upgrade. I'm kind of new to this. My bad, if I mistaken. – DKP Jan 06 '17 at 06:46
  • 3
    As for install update: http://askubuntu.com/questions/834082/what-does-apt-get-install-update-do – muru Jan 06 '17 at 06:50
  • so, basically, apt-get install updatedoes nothing but throw error, as there is no package named update!!??? – DKP Jan 06 '17 at 06:54
  • I was giving you the correct command for apt update then apt upgrade. Those are usually the order you would run the updates. – Terrance Jan 06 '17 at 07:02

1 Answers1

3

apt-get update instruct apt to get the list of available new packages from the remote repository (please note that it does not install anything, it just get the list of what is available).

apt-get install update tells apt to install a package that is named update. There is no package by that name in any known repository. This is the reason for the error message. You get this kind of message each time you ask the installation of a non existent package.

Although I don't think like @terrance, and this question is not a duplicate of What is the difference between apt-get update and upgrade?, you should probably take a look at that page, as was suggested.

As to this second question, « Is it okay, if i use apt-get update instead? » :

It all depends of what you are trying to achieve. If your goal is to update the apt list of available sofware package, then yes. On the other side if your goal is to print error message and don't change the apt internal state, then no.

zaq
  • 46