0% found this document useful (0 votes)
14 views23 pages

Lesson 08 - Package Management

The document provides an overview of Ubuntu's package management, focusing on accessing repositories, using the apt/apt-get command, and installing Personal Package Archives (PPA). It outlines the types of repositories available, the commands for managing software packages, and the distinction between updating and upgrading packages. Key takeaways include the definition of a repository, the use of the apt command, and the nature of PPA.

Uploaded by

Vrushank Bhatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views23 pages

Lesson 08 - Package Management

The document provides an overview of Ubuntu's package management, focusing on accessing repositories, using the apt/apt-get command, and installing Personal Package Archives (PPA). It outlines the types of repositories available, the commands for managing software packages, and the distinction between updating and upgrading packages. Key takeaways include the definition of a repository, the use of the apt command, and the nature of PPA.

Uploaded by

Vrushank Bhatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Ubuntu Fundamentals

Package Management
Learning Objectives

By the end of this lesson, you will be able to:

Access the repository

Apply the apt/apt-get command

Install PPA
Repository

A repository can be defined as a central storage area for all software packages.

The repository list can be found in the /etc/apt/sources.list directory of Ubuntu OS.
Types of Repositories

The four types of repositories to download software from are:

• Main

• Restricted

• Universe

• Multiverse
Types of Repositories

This is the default repository and all the packages in this are free.
Main

This is a closed-source software supported by Canonical for a price till the


Restricted
end of the life cycle of the release.

This is a community-supported open-source software. Canonical will not


Universe support this in terms of providing updates for this release software.

This includes closed-source software, such as adobe flash. It also includes


Multiverse
open-source software with some restrictions.
Repository Access

To access a repository, the system should be connected to the internet.

• Select the required repository from the


Ubuntu software center console along
with the source location.
Repository Access

• In the next tab, add repository URL into


the file /etc/apt/sources.list.

• To check for updates and new releases,


use the command $ sudo apt-get update.
Software with .deb Extension

• In case the software packages are released in a .deb file format, there is no need to use the repository
commands such as apt or apt-get.

• Use the command $ sudo dpkg -i <package name> to directly install the software, and if there are any
dependency failures, use the command $ sudo apt-get install -f.
Introduction to apt/apt-get Command

• The apt command is a CLI command used


to download, install, and remove the
software packages.

• The earlier version of apt command was


called apt-get command.

• All new releases of Ubuntu have the apt


command.
Introduction to apt/apt-get Command

Some of the frequently used apt commands are to:

• Install packages with the syntax:


$ sudo apt install <app-package1> <app-package2>

• Uninstall packages with the syntax:


$ sudo apt <app-package1>

• Remove orphaned application packages


automatically.

o While installing the packages, apt resolves the


dependencies automatically.

o Similarly, while uninstalling, it removes the critical


dependencies of the application automatically. It is
done by the command $ sudo apt autoremove.

• Search packages with the syntax:


$ sudo apt search <keyword>.
Update vs. Upgrade

Update will check the availability of new versions of a given package, whereas
upgrade will update the packages to a new version.
Introduction to PPA

• Personal Package Archives (PPA) are


software packages that are released by the
developer without any testing for
publishing in the repository.

• These are published separately and can be


installed from the software center.
Key Takeaways

Repository can be defined as a central storage area for all


software packages.

$ sudo apt-get update command is used to check for


updates to the software on the system.

The apt command is a command-line interface command used


to download, install, and remove the software packages.

PPA or Personal Package Archives are software packages


released by the developer without testing.
Knowledge Check
Knowledge
Check
Which among the following is used to describe the storage space of software packages?
1

A. Media

B. Repository

C. Cloud

D. None of above
Knowledge
Check
Which among the following is used to describe the storage space of software packages?
1

A. Media

B. Repository

C. Cloud

D. None of above

The correct answers is B

Repository is a storage space used to store software packages.


Knowledge
Check
Which directory contains the URL for a repository?
2

A. /etc

B. /home

C. /etc/apt/source.list

D. /proc
Knowledge
Check
Which directory contains the URL for a repository?
2

A. /etc

B. /home

C. /etc/apt/source.list

D. /proc

The correct answer is C

The file or directory /etc/apt/source.list contains the list of repositories available for download.
Knowledge
Check
Which command is used to install software packages in Ubuntu?
3

A. rpm

B. install

C. apt

D. download
Knowledge
Check
Which command is used to install software packages in Ubuntu?
3

A. rpm

B. install

C. apt

D. download

The correct answer is C

The apt command is used to install software packages in Ubuntu.


Knowledge
Check
What does PPA represent?
4

A. Packages released but not published in repositories

B. Non-Ubuntu packages

C. tar files

D. CLI commands
Knowledge
Check
What does PPA represent?
4

A. Packages released but not published in repositories

B. Non-Ubuntu packages

C. tar files

D. CLI commands

The correct answer is A

PPA represent the packages that are released by the developer without any testing for publishing.

You might also like