An APT repository is a collection of software packages that are available for download and installation on a computer running the Ubuntu operating system. The Ubuntu software repository is a great example of an APT repository. It contains thousands of software packages that are available for download and installation on Ubuntu. In this article, we’ll show you how to add an APT repository to your Ubuntu system. We’ll also show you how to search for and install software packages from the repository.
What is an APT repository?
An APT repository is a collection of software packages that are available for download and installation on a computer running the Ubuntu operating system. The software packages in an APT repository are called packages for historical reasons. A package is one or more files containing the software instructions (source code) and data needed to run that software, along with information about how the package can be installed. The package is handed over to a computer program called a package manager, which installs the package on the computer and manages the software’s installation and uninstallation.
The Ubuntu software repository is a great example of an APT repository. It contains thousands of software packages that are available for download and installation on Ubuntu.
Method 1 – Add Repository with add-apt-repository
You you can use Ubuntu software center or the command line interface (CLI) to add the repository. To use the CLI to add a repository, open a Terminal window and then enter the following command at the prompt:
sudo add-apt-repository ppa:libreoffice/ppa
You can fixed error add-apt-repository command not found if occurred.
For other hosted repositories, can be also configured by providing its reference as below:
sudo add-apt-repository 'deb http://archive.getdeb.net/ubuntu wily-getdeb games'
Method 2 – By Creating Repository Files
You can just create a file in /etc/apt/sources.list.d directory. The file name must end with a .list extension. The apt package manager also reads repository configuration files from here.
sudo vim /etc/apt/sources.list.d/games.list
Add the repository paths as below.
deb http://archive.getdeb.net/ubuntu wily-getdeb games
It’s good to use one repository per file but you can add multiple repository references in a single file as much as required.
How to Remove APT Repository in Ubuntu?
You can remove an APT repository from your Ubuntu system if you decide that you don’t want to use it. However, if you remove a default APT repository, you will not be able to install software from it.
You can remove an APT repository using the Ubuntu Software application or the CLI. To use the CLI to remove a repository, open a Terminal window and then enter the following command at the prompt:
sudo add-apt-repository --remove ppa:libreoffice/ppa
If you have created a file under
/etc/apt/sources.list.d directory, then remove it manually.
The APT repository is a great way to install and update software on your Ubuntu computer. If a software package that you need is not available from the default repositories, you can add an APT repository to your system and install the package from it. Apt Repositories allow software developers to publish their applications so that anyone who uses the Ubuntu operating system can install them. Anyone can create and publish an APT repository, and Ubuntu users can add that repository to their system to install the software that it contains.
sudo add-apt-repository ppa:libreoffice/ppa
LibreOffice test builds and backports
This PPA will have what the Document Foundation calls “LibreOffice fresh”, the latest release of the newest series (but no alpha/beta releases).
There is a PPA dedicated to specific LibreOffice major series which support a range of older Ubuntu releases too:
(testbed for 18.04 LTS SRUs)
(testbed for 16.04 LTS SRUs, EOL upstream)
(testbed for 14.04 LTS SRUs, EOL upstream)
Alpha and beta releases of a new major releases and the first release candidate of minor updates can be found at:
So much for other ppas.
Please file bugs for these packages on launchpad as described in:
This PPA might contain the release candidate that is assumed to become the final release even before it is declared so by the Document Foundation (e.g. usually release candidate 2 for minor updates).
Most of the packages in this PPA have only experienced minor testing — in fact it is the place to enable a wider audience to test packages before they are published into the distro proper. In general, this PPA is _not_ for the average user to install without a closer look (if it would be, its packages would be in the main repositories). OTOH, it is _way_ _better_ to use packages from this PPA than using the *.deb files that The Document Foundation provides upstream, which are intentionally build against a very old baseline for maximum compatibility. So, _if_ you want to be on the bleeding edge, do it here, not with upstream *.debs.
In general, users are advised to take a look at the changelog for the details about a package. If there is a specific bug that is intended to be addressed by an update released into the PPA, you are encouraged to test, if the update solves that problem. Packages published after the distro release are mostly such specific fixes. Critical fixes will be SRUed into the main repositories after testing anyway (later, with more testing).
To return to the LibreOffice version from the main archive, use ppa-purge. see: http://www.webupd8.org/2009/12/remove-ppa-repositories-via-command.html for details
More info: https://launchpad.net/~libreoffice/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox ‘/tmp/tmpf5yudwep/pubring.gpg’ created
gpg: key 83FBA1751378B444: 2 signatures not checked due to missing keys
gpg: /tmp/tmpf5yudwep/trustdb.gpg: trustdb created
gpg: key 83FBA1751378B444: public key “Launchpad PPA for LibreOffice Packaging” imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python3.5/threading.py”, line 914, in _bootstrap_inner
File “/usr/lib/python3.5/threading.py”, line 862, in run
File “/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”, line 688, in addkey_func
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 386, in add_key
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 273, in add_ppa_signing_key
File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 234, in cleanup
File “/usr/lib/python3.5/shutil.py”, line 480, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File “/usr/lib/python3.5/shutil.py”, line 438, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File “/usr/lib/python3.5/shutil.py”, line 436, in _rmtree_safe_fd
FileNotFoundError: [Errno 2] No such file or directory: ‘S.gpg-agent.extra’
It should be against the law to show how to add repository
but not show how to remove repository
I agree most strongly!
For Ubuntu 18.04 this will do the trick:
sudo add-apt-repository ‘deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu1804 ./’
Thanks for visiting Deb.