How to use local repositories?

Asked by Kalanon

Hi,

There is a local repository available in university that i attend.
and this is what they offer for sources.list of ubuntu:

deb http://repo.sadjad.ac.ir/ubuntu trusty main restricted universe multiverse
deb http://repo.sadjad.ac.ir/ubuntu trusty-updates main restricted universe multiverse
deb http://repo.sadjad.ac.ir/ubuntu trusty-security main restricted universe multiverse

so, I want to make my elementary os to do this:
*download packages that are available in local repository from local repository
*download packages that are not available in local repository from the internet

How can i do this?

Thank you and sorry for my bad english! :D

Question information

Language:
English Edit question
Status:
Answered
For:
elementary OS Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
kay van der Zander (kay20) said :
#1

Hi Kalanon,

You could add the lines to the sources.list this will give you the possibility to download the packages from that repo.
Note look at the current style of all the lines in the sources.list keep it the same. Words after trusty can ben different
Normaly apt-get (package manager) should sort things out on his own when you update.
This also counts for the installation of new packages. So when you do this terminal command:
                                      "sudo apt-get install <package-name>"
Then it will find the right repo which has this package. So you can download packages from standard repo's and from the repo of your university.

Note when 2 repo's has the exact same package name apt-get install or update will give an error or will get the latest updated.
This could give not wanted result. how to check
with "apt-cache search <package name>" give you the result on the current sources.list if the package is in the repo.
with "apt-cache show <package name>" it give a description of the package.
With both command you can check if the current repo's contains the same package only other version.

Can you help with this problem?

Provide an answer of your own, or ask Kalanon for more information if necessary.

To post a message you must log in.