Ask Your Question

How do I add a repository Ubuntu Bionic

asked 2019-05-15 19:15:14 -0500

jrock gravatar image

My output of

cat /etc/apt/sources.list.d/ros-latest.list


deb main

So I want to replace this as its missing the distribution name.

Searching at I am shown the following:

###### Ubuntu Main Repos
deb  main 
deb-src  main 

###### Ubuntu Update Repos
deb -security main 
deb-src -security main

My question is: How do I replace my malformed repository with the one I found at the repogen website?

Thank you

edit retag flag offensive close merge delete



deb main

a typo? It seems to be missing the // between http: and

gvdhoorn gravatar imagegvdhoorn ( 2019-05-16 02:12:01 -0500 )edit

How do I replace my malformed repository with the one I found at the repogen website?

I wouldn 't use repogen for this: it seems to be slightly out-of-date (only lists Bionic (alpha 2)), it doesn't help you configure the ROS repositories and seems to be more geared towards setting up the main sources.list. For ROS you'd use an add-on file (ros-latest.list) which is not part of sources.list, but placed in /etc/apt/sources.list.d/ (which is a directory, not a file).

gvdhoorn gravatar imagegvdhoorn ( 2019-05-16 02:54:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-16 02:11:18 -0500

gvdhoorn gravatar image

updated 2019-05-16 02:58:04 -0500

It's just a text file, so you can edit it using nano, vim, joe, gedit, anything. You will need to use sudo though, as it's a file in a non-world-writable location (ie: only root may change it).

On my system (ROS Melodic on Ubuntu Bionic) ros-latest.list contains:

deb bionic main

Note the bionic between and main.

The following command will write this line to the ros-latest.list file:

echo "deb bionic main" | sudo tee /etc/ros/rosdep/sources.list.d/ros-latest.list
edit flag offensive delete link more


Excellent. Thank you. This worked.

jrock gravatar imagejrock ( 2019-05-17 23:38:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-05-15 19:15:14 -0500

Seen: 31 times

Last updated: May 16