add-apt-repository
Quick Reference
Command Name:
add-apt-repository
Category:
package management
Platform:
linux
Basic Usage:
Common Use Cases
Syntax
add-apt-repository [options] repository
Options
Option | Description |
---|---|
-h, --help | Show help message and exit |
-m, --massive-debug | Print a lot of debug information |
-r, --remove | Remove the specified repository |
-y, --yes | Assume yes to all queries |
-s, --source | Allow downloading of source packages from the repository |
-n, --no-update | Do not update the package cache after adding the repository |
-u, --update | Update the package cache after adding the repository (default) |
-k, --keyserver | Specify a keyserver to receive keys from |
--key-id | Specify a key ID to import from a keyserver |
-f, --filename | Specify a filename to write sources list to (without .list) |
--disabled-repository | Add the repository as disabled |
Examples
How to Use These Examples
The examples below show common ways to use the add-apt-repository
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
# Add a PPA repository add-apt-repository ppa:user/ppa-name
Advanced Examples:
# Add a repository with source packages add-apt-repository --source 'deb-src http://archive.ubuntu.com/ubuntu focal main'