FUNDAMENTALS A Complete Guide for Beginners
One key attribute that makes Ubuntu so easy to use is its package management system, APT. APT works on top of repositories coming with lists of files that include the details of the software items they hold. However, for the package manager to function properly and offer the latest packages, you must keep your repository list up-to-date. Therefore, having expertise in how to update the repository list in Ubuntu is a handy feature to have in your Linux toolkit and I will cover that for you in this article.
Key Takeaways
- Learning about Updating the Repository List in Ubuntu.
- Getting Acquainted with the Importance of Repository List Updation in Ubuntu.
Requirements
- Sudo privileges.
- Access to the terminal.
The Necessity of Updating the Repository List in Ubuntu
The functionality, security, and smooth user experience regarding software packages in the system are all significantly impacted by updating the Ubuntu repository list which, as a result, is a crucial maintenance task. Some core necessities of the repository updation are mentioned as follows:
- Access to the Newest Software Releases: The updation of the repository list ensures access to the latest software packages and tools that the repositories are storages of. In addition, this also omits the risk of using out-of-date software by resolving compatibility and vulnerability issues.
- Software Feature Improvements: The repository updation lets users take advantage of the enhanced features and functionalities introduced by the community of developers.
- Security Upgrades: Attaining security upgrades is another prime reason for repository list updation since this attribute strengthens the system’s protection against security threats.
- Bug Fixes: The developers continually execute software debugging and settle software refinements. Thus, the repository list updation, in turn, lets users utilize the packages with the latest bug fixes.
- Stability and Reliability: The updated repository list also elevates the stability and reliability of the software components. This, in consequence, provides the practitioners with a robust computing environment with less number of glitches and system crashes.
3 Cases to Update the Repository List in Ubuntu
In this feature, I will enlighten you about 3 cases of repository list updation which are the most frequent as well as the most quintessential ones. In addition, I will display hands-on illustrations of 2 viewpoints centering around the CLI (Command Line Interface) and GUI (Graphical User Interface) based methods for updation.
Case 01: Updating the Repository List in Ubuntu as a Routine Maintenance
The primary objective of updating the repository list is to harmonize the package database with the most recent data available in the repositories. Therefore, it is essential to maintain the repository through list updating on a regular basis irrespective of adding or deleting repositories.
A. Using CLI to Update the Repository List in Ubuntu
The CLI lets you go through a less exacting process requiring simple commands for updating the Ubuntu repository list.
Steps to Follow >
➊ First, open the Ubuntu terminal.
➋ Then, run the command mentioned below:
sudo apt update
B. Use GUI to Update the Repository List in Ubuntu
Likewise, you can take the GUI-based approach for repository list updation if the visual perspective appeals to you more.
Steps to Follow >
➊ At first, go to the Software Updater application from the menu.The Software Updater application automatically starts to look for any available updates.
In the above image, you see that Software Updater is checking for updates in my system. If there’s any update on software packages, it will list that down and ask for installation in the following manner.
➋ After that select Install Now to get updates immediately, or click Remind Me Later as per your preference.
➌ Now, if you select the Install Now option, it will start fetching the updates for your list of repositories. However, the system will ask for authentication. Provide the user password here like the following: In the above image, you notice that I have entered my user password for authentication prior to the fetching of updates.
So, my system has already started downloading updates after a successful authentication.
➍ Finally, the system will give you a notification of the updation of the repository list and ask permission to install the software application with the latest package. The rest is left to your personal choice.In the screenshot above, you see the updates for my system repository list have been downloaded and are ready for installation.
Case 02: Updating Repository List in Ubuntu After Adding a New Repository
Apart from the scheduled maintenance, you must update the repository list after the attachment of a new repository to the Ubuntu system. This is recommended by the developer community to make the system aware of the additional repository metadata that was not available by default. For example, I will add a new repository and subsequently show the updating procedure by using both the CLI and GUI-based methods.
A. Using CLI to Update the Repository List in Ubuntu After Adding a Repository
You can add and then update the system repository log using simple commands in the following manner.
Steps to Follow >
➊ First, go to the terminal.
➋ Secondly, type the following command and hit ENTER.
sudo apt-add-repository deb https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/ jammy main
- sudo: Grants root privileges.
- apt-add-repository: Adds a new repository to the system.
- deb: Points out repository type in Debian-based distros such as Ubuntu.
- https ://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/: Repository web address.
- jammy: Codename for Ubuntu 22.04.
- main: Indicates that the software packages are within the main repository.
➌ At this point, run the below command to update the system repository list.
sudo apt update
So, I have updated the repository log and fetched information about the new repository to my system through this step.
➍ Finally, type the following command and press the ENTER button to see your added repository.
apt-add-repository --list
- apt-add-repository: Adds/deletes a repository.
- –list: Enlists all the available system repositories.
B. Use GUI to Update the Repository List in Ubuntu After Adding a Repository
Alternatively, you can make use of the GUI-centric approach to achieve repository list updation just after the insertion of a new repository.
Steps to Follow >
➊ First, Go to Software & Updates.➋ Now, redirect to Other Software, click Add, provide the repository URL, and click Add Source.
➌ At this point, enter the user password for authentication.➍ Finally, click Reload for software cache updation.
Here, the aforestated screenshot is the exemplar of the repository list updating process that incorporates the package database with the newest package versions.
Case 03: Updating Repository List in Ubuntu After Repository Deletion
Likewise, the repository log updation is cardinal after a user removes a repository from the system. It warrants the package management system that a certain package along with its metadata no longer present to avail. Therefore, walk with me to get acquainted with the updation procedure revolving around CLI & GUI after repository deletion.
A. Use CLI to Update the Repository List in Ubuntu After Removing a Repository
Utilize the CLI with super simple commands to update the repository list on your Ubuntu system.
Steps to Follow >
➊ First, Press CTRL+ALT+T to open the terminal.
➋ Then, run the following command.
apt-add-repository --list
The above snap shows the repositories currently extant on my system. Now, I will remove the repository namely deb https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/ jammy main.
➌ Now, type the below command and press ENTER.
sudo apt-add-repository --remove debhttps://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/ jammy main
- apt-add-repository: Adds/removes repositories.
- –remove: Deletes the specified repository.
- deb: Points out repository type in Debian-based distro such as Ubuntu.
- https ://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/: Repository web address.
- jammy: Codename for Ubuntu 22.04.
- main: Indicates that the software packages are within the main
➍ After that, run the following command to get your system the necessary updates.
sudo apt update
➎ On an end note, type the below-mentioned command and hit the ENTER button.
apt-add-repository --list
In this snapshot, I have shown that I have deleted the intended repository and displayed the latest repository log information with success.
B. Use GUI to Update the repository List in Ubuntu After Removing a Repository
If you are attracted to the visual interface of Ubuntu, then you can utilize GUI for repository deletion and the actual goal of updating the index afterward.
Steps to Follow >
➊ First, Go to Software & Updates.➋ Secondly, go to the Other Software tab, click on the repository name to select, click Remove, and lastly, click Close.
So, here, in the above image, I have shown the deletion of the repository named http://archive.getdeb.net/ubuntu wiley-getdeb games with the assistance of GUI.
➌ Thirdly, enter the user password for authentication.➍ Finally, clicking the Reload button will update the repository cache.
The above-captured image shows the updation process by clicking Reload. It gives an alert to the system index that the selected repository has been removed and is no longer available.
Comparative Analysis of Methods
As of now, I have introduced you to 2 effective methods for updating the repository list in 3 different situations. In this scope, I will feature some advantages and disadvantages of both methods.
Methods
Pros
Cons
Using CLI
Using GUI
preference. For example, if you are comfortable using the command line or working on a server, then the first method (Using CLI) is for you. However, you can exercise the use of the latter method (Using GUI) if you like the vision-based interface.
Conclusion
In this article, I have discussed the repository list updation in Ubuntu. Moreover, I have shed light on 3 practical cases of updating the repository index along with mentioning the necessities. I hope that the hands-on experience will aid your learning of repository management and take you one step further in becoming a Linux power user.
People Also Ask
Related Articles
- How to Remove APT Repositories in Linux[2 Easy Methods]
- The Universe Repository in Ubuntu [Enable, Install, Disable]
- The Repository Mirror in Ubuntu [An Extensive Overview]
- How to Add Repository in Ubuntu? [2 Simple Methods]
- [Solved] add-apt-repository Command Not Found Error in Ubuntu
- How to add an APT Repository Proxy in Ubuntu [Easiest Guide]
<< Go Back to Repository Configuration in Linux | Package Management in Linux | Learn Linux Basics