246

How do I get to the Universe Repository in supported versions of Ubuntu?

Elder Geek
  • 35,476
  • 25
  • 95
  • 181
Dr.C.Badrinathan
  • 2,525
  • 2
  • 16
  • 5
  • Related: [“Unable to locate package” while trying to install packages with APT](https://askubuntu.com/questions/378558/unable-to-locate-package-while-trying-to-install-packages-with-apt) – Eliah Kagan Nov 25 '19 at 10:52
  • it showed me error on aws ububtu standard , but managed to fixed it ike this - add-apt-repository universe - apt update - apt-get install -y curl jq python3-pydot graphviz – Harry Sarshogh Sep 29 '20 at 09:04

4 Answers4

268

If you want in one command and not use Software source ticking then in terminal put:

sudo add-apt-repository universe

On older versions of Ubuntu, you might have to use a full source line:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

To enable all Ubuntu software (main universe restricted multiverse) repositories use

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"

you can add also partner repository with different link (see difference is ubuntu to canonical)

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"

Then update the package list:

sudo apt-get update

p.s.

$(lsb_release -sc) checks your Ubuntu version and puts its name in the source link. Since 12.04 is called precise, you can test in a terminal that lsb_release -sc gives precise. That adds the precise name of your Ubuntu release in Software sources. Wrong word and nothing will work.

For all differences in repositories read https://help.ubuntu.com/community/Repositories/Ubuntu

David Foerster
  • 35,754
  • 55
  • 92
  • 145
Kangarooo
  • 4,988
  • 6
  • 33
  • 40
  • 8
    Just a note that you may have to run `sudo apt-get update` before you can install the package you wanted. – ty01 Nov 21 '13 at 19:17
  • Debian doesn't always come with lsb_release installed, but if you have it you can use a similar syntax with their mirror URLs. – dragon788 Dec 22 '20 at 13:10
55

First, open software center. Click on 'edit' and then 'software sources' to open the software sources window. Once that is open, check the box that says, "Community-maintained free and open-source software (universe)."

enter image description here

Now, all the universe packages should show up in software center just like all the other ones.

More information:

user69469
  • 593
  • 4
  • 7
  • In my case ( on Ubuntu 16.04 LTS) This option was already checked. So i have just unchecked it and then checked it again. Click on "revert" and then software cache will update. And then i was able to install stable chrome using ubuntu software installer with stable debian page. Thanks @user69469 :)) Strang!! isn't it? – Yashrajsinh Jadeja May 29 '17 at 16:01
38

Command Line Way of enabling Ubuntu software Repositories For 12.10 and above:

To enable main repository,

sudo add-apt-repository main

To enable universe repository,

sudo add-apt-repository universe

To enable multiverse repository,

sudo add-apt-repository multiverse

To enable restricted repository,

sudo add-apt-repository restricted

NOTE:

After enabling the repositories, don't forget to update it.Run the below command to update the repositories,

sudo apt-get update
Avinash Raj
  • 77,204
  • 56
  • 214
  • 254
  • 3
    what's the difference between your answer and kangaroo's answer, yours seems shorter, and simpler. – speedox Jun 19 '15 at 01:31
  • 9
    Because my answer won't work for the versions below 12.10 – Avinash Raj Jun 19 '15 at 05:02
  • 1
    Is there also a way to check them first? So you only enable them when they aren't enabled already... For scripting purposes. – user2304170 Apr 30 '16 at 11:53
  • If they are already enabled, you'll get a message saying that it is already available ``` $ sudo add-apt-repository main 'main' distribution component is already enabled for all sources. ``` – Muhammad Ali Sep 25 '19 at 14:24
17

Open dash and type Software sources

type <code>software sources</code> in Dash

then open software sources and click on the the universe repository .

select "Community maintained Open Source Software (universe)"

Close and reload cache

reload cache

Lekensteyn
  • 171,743
  • 65
  • 311
  • 401
Ashu
  • 9,384
  • 3
  • 37
  • 58