Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 670  / 2 Years ago, mon, january 10, 2022, 11:06:49

Can someone please explain what's the use of these?




  1. sudo apt-get update

  2. sudo apt-get upgrade

  3. apt-add-repository



and what are the combinations to use these?


More From » apt

 Answers
4

A bit of background



For update and install Ubuntu like systems uses a concept called software source or repository.



A repository is collection of libraries, executable.



The libraries, software's inside a repo is maintained using a list file. So when somebody update the list file in server , the user will download the latest list file. This list file indicates which files has update and which are not. Using this you can download only the updated component. No need to get whole software.



Beside Ubuntu official repo, there are many 3rd party developers who distribute there application. Ubuntu provided them a easy way to distribute in Ubuntu. That is called a PPA.



A PPA is also a repo, but maintained by the developer. Ubuntu doesn't take responsibility.



Your questions answer



apt-add-repository your-repository-here is to add a PPA as a source of software for your computer.



apt-get-update is to get the latest source file list (not the software, it downloads only the index) from the all added repo. Like you added some repo in first step. Those software won't be available till you execute them.



sudo apt-get upgrade is to update all available updates for the installed software. It uses the latest list file downloaded as a reference to determine which components needs to be installed .


[#35771] Tuesday, January 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bearous

Total Points: 226
Total Questions: 116
Total Answers: 136

Location: Guernsey
Member since Sun, Jan 10, 2021
3 Years ago
;