In this Linux beginner's tutorial, you will learn about apt (Advanced Package Management Tool). We will also learn about different package management tool and why need one in Linux.
This video tutorial shows you all the needed possible apt-get commands that one needs to know to manage any package on a Linux distro.
|| Also, check out complete article here ||
https://linuxh2o.com/complete-apt-get-package-manager-guide-for-linux/
☼ Also, check out other videos ☼
➟ Must have Linux apps guide for power users
➟ https://youtu.be/udj2PWCD66k
➟ Best ebook readers for Linux (epub, mobi, azw3, pdf)
➟ https://youtu.be/KiFOymLAnXA
➟ ProtonVPN • Best Free VPN Service For Linux
➟ https://youtu.be/rTcTvpSIvBg
➟ Enable Single Click Feature in File Manager
➟ https://youtu.be/hoWvNv3q8U8
Show More Show Less View Video Transcript
0:00
Hello there and welcome to Linux S2O and this video is about the Advanced Packagement Tool or
0:09
APT or App. So in this video we will learn how to use the Advanced Packagement Tool to manage
0:14
the packages. But before going into that we first need to know what is a repository and how we use
0:20
it in our day-to-day life. So have you ever wondered like when you open the terminal and
0:25
and when you hit the update command that is sudo apt update and you type in your
0:35
password basically and a list of links just pops up in the terminal and they
0:41
does some kind of fetching basically they are fetching the list of applications and they are also fetching like whether any update is available to
0:49
the install package or not so these links basically are pointing to a
0:53
repository. Repository basically is a place, a central place you can say where all the packages
0:59
are stored. So if you are using Ubuntu or any of its derivatives then the repo is maintained by the
1:07
Launchpad. So Launchpad is a website that is maintained by Canonical and Canonical is the
1:12
parent company behind the Ubuntu. All the packages are there and we basically contact to the repo to
1:19
get the applications and that is done with the repository links so in this I have so many
1:26
repository links for example these are the different repository links that are pointing
1:31
so these all links are different for example this allows me to download the Bibaldi application and
1:37
these repo can be hosted individually by their respective authors as well but most of the repo
1:42
will be stored in the launch pad and they they have the all the packages and we download those
1:49
packages after authenticating basically we need some kind of authentication so that we download
1:54
only the secure applications from the servers so that is the repository where all the packages are
2:00
stored and to get the packages from there we have to add those repository links these links to our
2:06
system and after establishing the connection we need some kind of tool that will allow us to manage
2:12
the applications so what if i want to install any package in my system how will i be able to do that
2:18
And what if I want to download the package and I want to install that package and these
2:24
all things can be done using a package manager. So there are of course many package managers out there but the most popular one is the
2:32
advanced package man tool that is APT which is used by Mint which is used by MX, Linux
2:37
elementary OS, Ubuntu and Debian and there are bunch of applications and there are bunch
2:42
of distributions that use the advanced package man tool. But there are other package management tool as well
2:47
For example DFN is there. DFN basically used by Fedora and Red Hat and any derivative of it
2:53
For example CentOS uses DFN. Earlier they used to use YUM but now they use DFN
3:00
And there are other as well like Dipper is there and there is Pacman which is used by Manzaro
3:05
There are different kind of management tool available but the APT is the most popular one
3:12
So let's get into the tutorial and see how to use the advanced Pacman tool to manage
3:16
the packages in the system. By packages I simply means the applications
3:20
So let me clear the terminal using the control L and I will show you the commands that are there with the advanced packaging tool So the very first command that I just ran is sudo apt update So to make any changes in the system we have
3:34
to use sudo, right? So we are saying like sudo. So that is the
3:38
typical command. But after that we are specifying like we want to use advanced packaging tool and with the advanced
3:45
packaging tool, what we want to do, we want to update the repositories. So for that, I will hit the update command. So
3:51
this will contact all the repository links to the servers and will fetch the
3:56
package list and any updates if they are available like this is saying there are
4:01
some updates available and if you want to see them you can hit this command so
4:05
this doesn't require any pseudo privilege so I can directly an APD list
4:09
and then I can type like upgradable and this will list me all the packages that
4:16
have an update so these are basically my graphic card drivers so they have got
4:22
some kind of updates here so if I want to install these update what I can do I
4:26
can type sudo apt upgrade so this will upgrade all these packages that are
4:32
installed in my system like this is saying you need to get around 112
4:36
megabytes of data and after the operation I mean after the operation six
4:41
megabytes of extra additional disk space will be used and if I want to continue I
4:45
can type Y and hit enter so this will download the packages files from the server and install
4:51
them in the system so the update command is for checking whether any update is available
4:56
to a certain package and the upgrade command for upgrading the particular package now this
5:02
is upgrading all the packages at once but if I want to upgrade only single package I
5:07
can do that so what if I don't want to upgrade any of these packages I only want to upgrade
5:12
this one here so I can simply copy the name this is Mesa-ba-drivers I can type
5:18
apt upgrade and this name so this will upgrade only this particular package
5:23
not the all packages so let me just fast forward this video so that this
5:27
downloading can be finished so it has done updating the system so I'm going to
5:31
clear the terminal so so far we used two commands one is update and another one
5:36
is upgrade next is install remove command so if you want to install any
5:41
package you can do that to install any package you can type sudo apt because we
5:46
want to use apt and it requires sudo probably so we are adding the sudo and then what we want to do we want to install and package and we can do that
5:54
and we can now specify the package name for example I want to install blc so I
5:59
will type blc I will hit enter and this is saying like I already have blc
6:03
installed so I do not need to install so what if I want to remove the blc so what
6:09
I will do basically sudo apt remove and I will type plc. So now you are seeing the pattern is
6:17
following basically you type the sudo command then the package management tool name and what
6:22
you want to do with it for example I want to remove and package from the system. So here it
6:27
is saying like you can remove the plc and how much disk will be free so I can type by and hit enter
6:33
so this will remove the blc from the system now if i try to search blc i will not be able to find
6:39
blc in the system but there is a different command as well for removing the package and that is purge
6:45
so if i type here again like sudo apt install blc so this will install the blc of course so this has installed the blc again The blc is available in the system now So when I use the remove command to remove any application it simply removes the application
7:05
But it does not remove any configuration files attached to it So if blc has any configuration files in the system, they will not get removed typically when we want to remove any application
7:14
We do not want any files that belongs to that application remaining in the system
7:19
we want to simply remove those files and if you want to do that then you can use purge command
7:24
for removing any application so earlier we use like sudo apt remove but now we will use purge
7:31
we will type purge and we will type the application name that we want to remove
7:36
so i will hit enter so this is saying like this will remove all the packages and configuration
7:41
files associated with it so I will hit enter or I can type by and hit enter and
7:47
this will do the job if I run update command again so if I like like sudo apt
7:53
update this will update the system this also gives you some kind of information
7:59
to let you know like what can be done with your packages so like I have simply
8:03
updated the repositories but any updates is not available because I just
8:08
upgraded the system so if I type sudo again apt upgrade nothing will get
8:13
upgraded but this is saying like there are certain packages that are installed
8:18
in the system but they are no longer required for example I have removed blc
8:22
but some packages that are simply installed in the system but they are not
8:26
required because the application is not available and to remove these additional
8:31
packages that are installed in the system you can use this command so this
8:35
is auto remove so this removes any dependency that is available but it is
8:39
not required by any application so simply execute this command sudo apt
8:45
auto remove and hit enter so this will free around 400 megabytes of data from
8:52
the system I can type by and this will remove all the data that is unnecessary
8:56
in your system related to paxs of course so we have covered like update command
9:01
upgrade command install and we have also learned the differences between remove and pulse command
9:07
so we have done that and we have already used the auto remove command now let's do other things for
9:13
example what if i want to know how many packages are installed in my system like i want to see all
9:19
the packages list that are installed in my system i can do that so for that i can simply clear the
9:24
terminal first and i can type apt list so this will list all the packages that are installed in
9:32
the system so there are like hundreds of packages that are installed in my system so this is the
9:37
whole list of those packages so you can use this command to list all the packages basically there
9:42
are other commands as well for example if you want to search any package in the whole repo
9:46
site like you want to search whether a particular package or application is available in the repo
9:52
or not. So let's say we want to search for an application called Spotify whether it is available
9:58
in the original repository of Ubuntu or not. So if I like search for if I type like apt and type here
10:05
search and I will specify the package name that is Spotify I will hit enter. So this is saying like
10:13
there are some packages available and they are like Spotify client is there. So this is basically
10:20
returning me the package name that is installed in my system So this is not basically getting any package that is available in the repo But there are some packages for example this is here Spotify client
10:31
Qt available in the repo. So this is basically anything that is matching with this Spotify bug
10:37
So this is basically anything that is matching with this Spotify bug that is available in the
10:41
repo. It is returning all the results and you can do the same with the PLC as well. For example if
10:47
you want to search whether the BLC is available in the system or not. So this will give you all the
10:51
packages that are associated with the BLC. So these are packages that can be installed in the
10:56
system. So basically you can search in the repo using search command. You can also see the details
11:01
of a particular package. For example, I want to know some details about BLC. So we are using BLC
11:07
again. I can type APD and I can type like show BLC. So this will give me all the details related to
11:14
the PLC so like package name is PLC what is the current version priority and what is the section
11:20
of the application the origin the maintainer the developers who are maintaining the packages and
11:26
the dependencies all the information that are related to that particular package you can use
11:31
so command to get the information about that package then we can also use a command called
11:36
download so in windows if you have used windows before then you probably download the executable
11:41
files and store them in a system like .exe file the same can be done with the
11:46
Linux as well so for example if you want to store the package of PLC so I'm
11:50
going to click the thumbnail you can simply type like apt download and the
11:56
package name it will simply download the package file so the PLC package has
12:02
been downloaded in the system so this is the PLC package here so it is very easy
12:07
to download any package if you want to download. Like if you want to download
12:13
SM player then I can simply type the SM player name and this will download the
12:19
package file. So here is the SM player. So Ubuntu uses .dev file so this is why it
12:24
is downloading .dev files. So you can download the packages as well using the
12:28
advanced package man tool you don't have to go anywhere else. Next sometimes we
12:32
want to reinstall the application right so that can be done. So if I type
12:37
BLC here so BLC is not installed so I can install sudo apt install BLC so this will install in the
12:43
system so around 7 megabytes needs to be downloaded so BLC install and for some reason I want to
12:52
reinstall BLC so I can type sudo apt reinstall BLC and I can hit enter this will simply reinstall
13:00
the application so that can also be done so these are the basic or necessary commands related to the
13:07
advanced packaging tool like how to update the repo how to upgrade packages available in the repo
13:12
and how to install remove parts or how to auto remove the non-required files how to list the
13:18
application details like what are the packages available related to a particular application
13:23
how to search for any package how to show details about any package how to reinstall a package
13:28
and how to download a package so all these commands are very easy and you have learned
13:33
these commands in this tutorial and i hope you find this tutorial helpful and if you did then
13:38
don't forget to subscribe to the channel hit that like button let me know what you think about this
13:42
tutorial in the comment section below and if you need any assistant with anything then let me know
13:47
i will make a tutorial on that and publish it on this channel so till then take care
13:51
and keep enjoying linux and i'll catch you in the next one
#Software
#Software Utilities
