Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Distributions»Ubuntu»How to Add Apt Repository In Ubuntu & Debian

    How to Add Apt Repository In Ubuntu & Debian

    RahulBy RahulApril 20, 20181 Min ReadUpdated:May 6, 2020

    This tutorial have describes two methods to configure Apt repository on your Ubuntu & Debian systems. The first method uses the add-apt-repository command to configure the repository for you. You can also use symlink command apt-add-repository. In any case, the command doesn’t exists on your system. The tutorial add-apt-repository command not found will help you.

    Method 1 – Add Repository with add-apt-repository

    Use the add-apt-repository (or symlink apt-add-repository) command to add launchpad PPA to your system. You just need to provide launchpad reference address as the following command.

    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:

    add-apt-repository 'deb http://archive.getdeb.net/ubuntu wily-getdeb games'
    

    Method 2 – Add Repository with Files

    You can just create a file in /etc/apt/sources.list.d directory. The file name must end with .list extension. The apt package manager also read repository configuration files from here.

    For example:

    vim /etc/apt/sources.list.d/games.list
    

    Add the repository paths as below.

    deb http://archive.getdeb.net/ubuntu wily-getdeb games
    

    Its good to use one repository per file but you can add multiple repository references in a single file as much as required.

    add-apt-repository apt
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Install VLC Media Player on Debian 9/8
    Next Article How do I Convert Date Format in PHP

    Related Posts

    Changing the Login Screen Background in Ubuntu 22.04 & 20.04

    Updated:May 9, 20222 Mins Read

    (Resolved) Please install all available updates for your release before upgrading

    2 Mins Read

    How to Install LightDM Display Manager on Ubuntu

    Updated:May 10, 20222 Mins Read

    Change Screen Resolution of An Ubuntu VM in Hyper-V

    Updated:May 2, 20222 Mins Read

    How to Check IPv4 Address on Ubuntu 22.04

    2 Mins Read

    How to Configure Static IP Address on Ubuntu 22.04

    Updated:May 4, 20223 Mins Read

    6 Comments

    1. Rob on August 7, 2019 1:33 pm

      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:
      https://launchpad.net/~libreoffice/+archive/libreoffice-6-1 (“Fresh”)
      https://launchpad.net/~libreoffice/+archive/libreoffice-6-0 (“Still”)
       (testbed for 18.04 LTS SRUs)
      https://launchpad.net/~libreoffice/+archive/libreoffice-5-4 (EOL)
      https://launchpad.net/~libreoffice/+archive/libreoffice-5-1 (EOL)
       (testbed for 16.04 LTS SRUs, EOL upstream)
      https://launchpad.net/~libreoffice/+archive/libreoffice-4-2 (EOL)
       (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:
      https://launchpad.net/~libreoffice/+archive/libreoffice-prereleases

      So much for other ppas.

      Please file bugs for these packages on launchpad as described in:
      https://lists.launchpad.net/libreoffice/msg00072.html

      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
      self.run()
      File “/usr/lib/python3.5/threading.py”, line 862, in run
      self._target(*self._args, **self._kwargs)
      File “/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”, line 688, in addkey_func
      func(**kwargs)
      File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 386, in add_key
      return apsk.add_ppa_signing_key()
      File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 273, in add_ppa_signing_key
      cleanup(tmp_keyring_dir)
      File “/usr/lib/python3/dist-packages/softwareproperties/ppa.py”, line 234, in cleanup
      shutil.rmtree(tmp_keyring_dir)
      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
      os.unlink(name, dir_fd=topfd)
      FileNotFoundError: [Errno 2] No such file or directory: ‘S.gpg-agent.extra’

      Reply
      • S on January 12, 2021 9:15 pm

        It should be against the law to show how to add repository
        but not show how to remove repository

        Reply
        • Tim Kissane on May 1, 2021 6:01 am

          I agree most strongly!

          Reply
    2. Vincent on May 12, 2019 2:18 pm

      Thanks,

      For Ubuntu 18.04 this will do the trick:

      sudo add-apt-repository ‘deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu1804 ./’

      Reply
    3. Medadyou on May 1, 2019 10:27 am

      Thanks

      Reply
    4. Cheapcialis on April 21, 2018 1:53 pm

      Thanks for visiting Deb.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.