FG
💻 Software

How do I add a apt-get repository without editing /etc/apt/sources.list?

Fresh5 days ago
Mar 15, 202688745 views
Confidence Score0%
0%

Problem

I want to add a repository to apt-get (without potentially messing up /etc/apt/sources.list) through the user of a script. This script may run multiple times so I can't just append the entry each time. Is there any way I can add a single file in a directory with entries? I know you can do this for …

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I add a apt-get repository without editing /etc/apt/sources.list?

Low Risk

You can place files in . This is described in the man page for (type ). The man page says: Older SOURCES.LIST.D The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. The format is the same as for the reg…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment