Home / Software / Adding Third-Party APT Repositories

Adding Third-Party APT Repositories

Debian logoOn Debian-based Linux servers, APT is the package manager of choice. By default, running apt-get will connect to the Linux distribution’s main package repository. In most situations, this is enough, but there are situations where you might want to add additional repositories. For example, if you are using a special web-based control panel or other unique software, the vendor may provide you with an update repository for that software.

1. To add repositories to your apt sources, you will need to login as root.


2. Edit the sources.list file found in the apt configuration directory:

nano /etc/apt/sources.list or vi /etc/apt/sources.list

3. Copy the source line given to you by the repository maintainer, and paste it on an empty line at the bottom of the file. It should look something like this:

deb http://websiteurl.net/debian sid main contrib free

3. Save the file and exit.

4. After saving, the new packages will not show up in the cache until you refresh it. Run the following command:

apt-get update

Now, you should see the new packages when you search and try to install them. If you ever need to disable the repository, simply place a “#” in front of it in the sources.list file to comment out the line. To remove it completely, just delete it. Anytime you make changes, be sure to run “apt-get update” again.

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …