What does apt-get update actually do? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
-2
down vote

favorite













This question already has an answer here:



  • What does “sudo apt-get update” do?

    9 answers



I have a brand new installation of Ubuntu 18.04. I then ran apt-get install curl and it gave me:




Package 'curl' has no installation candidate




I then ran apt-get update and tried installing curl again and it worked this time.



The term "update" can mean lots of things. What does it mean in the above context? what was it updating given that the Ubuntu I had just installed was the latest?







share|improve this question











marked as duplicate by muru, pomsky, karel, Melebius, Pilot6 Jun 6 at 7:15


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Thanks, but how does updating "the package lists for upgrades for packages that need upgrading" explain why curl was not available before and becomes available after update?
    – Old Geezer
    Jun 6 at 4:40










  • The old (possibly non-existent) package lists on your system didn't have curl, and the new lists had them.
    – muru
    Jun 6 at 4:41










  • as @muru says, and once you ran update you had the new lists so install could now install correctly
    – kerry
    Jun 6 at 5:37














up vote
-2
down vote

favorite













This question already has an answer here:



  • What does “sudo apt-get update” do?

    9 answers



I have a brand new installation of Ubuntu 18.04. I then ran apt-get install curl and it gave me:




Package 'curl' has no installation candidate




I then ran apt-get update and tried installing curl again and it worked this time.



The term "update" can mean lots of things. What does it mean in the above context? what was it updating given that the Ubuntu I had just installed was the latest?







share|improve this question











marked as duplicate by muru, pomsky, karel, Melebius, Pilot6 Jun 6 at 7:15


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Thanks, but how does updating "the package lists for upgrades for packages that need upgrading" explain why curl was not available before and becomes available after update?
    – Old Geezer
    Jun 6 at 4:40










  • The old (possibly non-existent) package lists on your system didn't have curl, and the new lists had them.
    – muru
    Jun 6 at 4:41










  • as @muru says, and once you ran update you had the new lists so install could now install correctly
    – kerry
    Jun 6 at 5:37












up vote
-2
down vote

favorite









up vote
-2
down vote

favorite












This question already has an answer here:



  • What does “sudo apt-get update” do?

    9 answers



I have a brand new installation of Ubuntu 18.04. I then ran apt-get install curl and it gave me:




Package 'curl' has no installation candidate




I then ran apt-get update and tried installing curl again and it worked this time.



The term "update" can mean lots of things. What does it mean in the above context? what was it updating given that the Ubuntu I had just installed was the latest?







share|improve this question












This question already has an answer here:



  • What does “sudo apt-get update” do?

    9 answers



I have a brand new installation of Ubuntu 18.04. I then ran apt-get install curl and it gave me:




Package 'curl' has no installation candidate




I then ran apt-get update and tried installing curl again and it worked this time.



The term "update" can mean lots of things. What does it mean in the above context? what was it updating given that the Ubuntu I had just installed was the latest?





This question already has an answer here:



  • What does “sudo apt-get update” do?

    9 answers









share|improve this question










share|improve this question




share|improve this question









asked Jun 6 at 4:15









Old Geezer

158118




158118




marked as duplicate by muru, pomsky, karel, Melebius, Pilot6 Jun 6 at 7:15


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by muru, pomsky, karel, Melebius, Pilot6 Jun 6 at 7:15


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • Thanks, but how does updating "the package lists for upgrades for packages that need upgrading" explain why curl was not available before and becomes available after update?
    – Old Geezer
    Jun 6 at 4:40










  • The old (possibly non-existent) package lists on your system didn't have curl, and the new lists had them.
    – muru
    Jun 6 at 4:41










  • as @muru says, and once you ran update you had the new lists so install could now install correctly
    – kerry
    Jun 6 at 5:37
















  • Thanks, but how does updating "the package lists for upgrades for packages that need upgrading" explain why curl was not available before and becomes available after update?
    – Old Geezer
    Jun 6 at 4:40










  • The old (possibly non-existent) package lists on your system didn't have curl, and the new lists had them.
    – muru
    Jun 6 at 4:41










  • as @muru says, and once you ran update you had the new lists so install could now install correctly
    – kerry
    Jun 6 at 5:37















Thanks, but how does updating "the package lists for upgrades for packages that need upgrading" explain why curl was not available before and becomes available after update?
– Old Geezer
Jun 6 at 4:40




Thanks, but how does updating "the package lists for upgrades for packages that need upgrading" explain why curl was not available before and becomes available after update?
– Old Geezer
Jun 6 at 4:40












The old (possibly non-existent) package lists on your system didn't have curl, and the new lists had them.
– muru
Jun 6 at 4:41




The old (possibly non-existent) package lists on your system didn't have curl, and the new lists had them.
– muru
Jun 6 at 4:41












as @muru says, and once you ran update you had the new lists so install could now install correctly
– kerry
Jun 6 at 5:37




as @muru says, and once you ran update you had the new lists so install could now install correctly
– kerry
Jun 6 at 5:37










2 Answers
2






active

oldest

votes

















up vote
0
down vote













OK as I understand (speaking as a Ubuntu user) Ubuntu uses a packaging system (in common I believe with other Linux OSs) apt-get accesses this system. apt-get is used to install, upgrade and 'tidy up' existing packages - it is also used to gather information before installing or upgrading via the uptade clause. apt-get update updates the database with information on any new packages or versions. It does not update any installed packages, it updates the database with what is available, apt-get install installs after referencing the database and apt-get upgrade upgrades already installed packages after referencing the database. If you install without updating you may be trying to install an incomplete or out of date system referencing the out of date database. If you then run upgrade you will upgrade the package to include any amendments / enhancements made since the package was released. Be clear on the difference between update and upgrade. Hope this helps.






share|improve this answer






























    up vote
    0
    down vote













    In Ubuntu if you want to install any package you have to type
    apt-get install package_name
    Here apt-get is nothing but a python script and it's called synaptic package manager and you can check source code of apt-get on Github.



    And update in the apt-get will downloads packages lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. You can see this  http://linux.die.net/man/8/apt-get:



    After running apt-get update when you run apt-get install curl since it's updated the curl package will be available now.



    And you should see this Where does apt-get install get packages from? to know what install will do.






    share|improve this answer






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      OK as I understand (speaking as a Ubuntu user) Ubuntu uses a packaging system (in common I believe with other Linux OSs) apt-get accesses this system. apt-get is used to install, upgrade and 'tidy up' existing packages - it is also used to gather information before installing or upgrading via the uptade clause. apt-get update updates the database with information on any new packages or versions. It does not update any installed packages, it updates the database with what is available, apt-get install installs after referencing the database and apt-get upgrade upgrades already installed packages after referencing the database. If you install without updating you may be trying to install an incomplete or out of date system referencing the out of date database. If you then run upgrade you will upgrade the package to include any amendments / enhancements made since the package was released. Be clear on the difference between update and upgrade. Hope this helps.






      share|improve this answer



























        up vote
        0
        down vote













        OK as I understand (speaking as a Ubuntu user) Ubuntu uses a packaging system (in common I believe with other Linux OSs) apt-get accesses this system. apt-get is used to install, upgrade and 'tidy up' existing packages - it is also used to gather information before installing or upgrading via the uptade clause. apt-get update updates the database with information on any new packages or versions. It does not update any installed packages, it updates the database with what is available, apt-get install installs after referencing the database and apt-get upgrade upgrades already installed packages after referencing the database. If you install without updating you may be trying to install an incomplete or out of date system referencing the out of date database. If you then run upgrade you will upgrade the package to include any amendments / enhancements made since the package was released. Be clear on the difference between update and upgrade. Hope this helps.






        share|improve this answer

























          up vote
          0
          down vote










          up vote
          0
          down vote









          OK as I understand (speaking as a Ubuntu user) Ubuntu uses a packaging system (in common I believe with other Linux OSs) apt-get accesses this system. apt-get is used to install, upgrade and 'tidy up' existing packages - it is also used to gather information before installing or upgrading via the uptade clause. apt-get update updates the database with information on any new packages or versions. It does not update any installed packages, it updates the database with what is available, apt-get install installs after referencing the database and apt-get upgrade upgrades already installed packages after referencing the database. If you install without updating you may be trying to install an incomplete or out of date system referencing the out of date database. If you then run upgrade you will upgrade the package to include any amendments / enhancements made since the package was released. Be clear on the difference between update and upgrade. Hope this helps.






          share|improve this answer















          OK as I understand (speaking as a Ubuntu user) Ubuntu uses a packaging system (in common I believe with other Linux OSs) apt-get accesses this system. apt-get is used to install, upgrade and 'tidy up' existing packages - it is also used to gather information before installing or upgrading via the uptade clause. apt-get update updates the database with information on any new packages or versions. It does not update any installed packages, it updates the database with what is available, apt-get install installs after referencing the database and apt-get upgrade upgrades already installed packages after referencing the database. If you install without updating you may be trying to install an incomplete or out of date system referencing the out of date database. If you then run upgrade you will upgrade the package to include any amendments / enhancements made since the package was released. Be clear on the difference between update and upgrade. Hope this helps.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Jun 6 at 5:34


























          answered Jun 6 at 4:39









          kerry

          159418




          159418






















              up vote
              0
              down vote













              In Ubuntu if you want to install any package you have to type
              apt-get install package_name
              Here apt-get is nothing but a python script and it's called synaptic package manager and you can check source code of apt-get on Github.



              And update in the apt-get will downloads packages lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. You can see this  http://linux.die.net/man/8/apt-get:



              After running apt-get update when you run apt-get install curl since it's updated the curl package will be available now.



              And you should see this Where does apt-get install get packages from? to know what install will do.






              share|improve this answer



























                up vote
                0
                down vote













                In Ubuntu if you want to install any package you have to type
                apt-get install package_name
                Here apt-get is nothing but a python script and it's called synaptic package manager and you can check source code of apt-get on Github.



                And update in the apt-get will downloads packages lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. You can see this  http://linux.die.net/man/8/apt-get:



                After running apt-get update when you run apt-get install curl since it's updated the curl package will be available now.



                And you should see this Where does apt-get install get packages from? to know what install will do.






                share|improve this answer

























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  In Ubuntu if you want to install any package you have to type
                  apt-get install package_name
                  Here apt-get is nothing but a python script and it's called synaptic package manager and you can check source code of apt-get on Github.



                  And update in the apt-get will downloads packages lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. You can see this  http://linux.die.net/man/8/apt-get:



                  After running apt-get update when you run apt-get install curl since it's updated the curl package will be available now.



                  And you should see this Where does apt-get install get packages from? to know what install will do.






                  share|improve this answer















                  In Ubuntu if you want to install any package you have to type
                  apt-get install package_name
                  Here apt-get is nothing but a python script and it's called synaptic package manager and you can check source code of apt-get on Github.



                  And update in the apt-get will downloads packages lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. You can see this  http://linux.die.net/man/8/apt-get:



                  After running apt-get update when you run apt-get install curl since it's updated the curl package will be available now.



                  And you should see this Where does apt-get install get packages from? to know what install will do.







                  share|improve this answer















                  share|improve this answer



                  share|improve this answer








                  edited Jun 6 at 5:36


























                  answered Jun 6 at 5:30









                  achal

                  1157




                  1157












                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491