Please Read This 👇🏾
Apt-get is an command line utility which is used to manage , manipulate , control, update , upgrade the system & its packages in Debian or Debian base Linux distro like Ubuntu. Its a very handy & powerful tool. In this post I will discuss & show some most common & useful apt-get commands. So lets start...
Note: You must have root privilege or sudo access
in order to use apt-get commands.
This is the most common but important command. Its update the list of available packages in the local repo & the
upgrade command will upgrade the packages which already you have
installed.
You can find the source list of the current
configured source package repository file under the
/etc/apt/source.list
2) sudo
apt-get install package_name
This is another important command which is used to
install a package which is present in the package source list.
3) sudo
apt-get remove package_name
Another command which is used to uninstall any
existed installed packaged in the Debian system. But this command
does not remove the package configuration, Also the dependencies of
package will remain in the system.
4) apt-get
remove --purge package_name
This command will remove the packages completely including configuration files but does not remove dependencies
5) sudo apt-get autoremove
You can use this command to remove the orphaned packages / dependencies which installed automatically while installing a particular package,
6) aptitude remove package_name
It will remove only those packages which are installed as a dependencies while installing a package. This commands only listen for dependencies.
7) apt list --installed
This command give you the list of all installed packages in the system. You can use --upgradable, --all options also.
8) apt-cache search package_name
search for a package which is installed / available in the cached repo list
9) apt-cache show package_name
This command will give you details about a package attributes e.g package full name, version, package source , size, dependencies etc .
10) apt-get full-upgrade
This command is used to fully upgrade the system from current version to a newly available version of debian system. For example Ubuntu 19.10 to 20.3
11) apt edit-sources
You can use this command to edit the source list in your system.
12) apt-get source package_name
This command will automatically found the latest source package and download it . your can specify the version with option -t
13) sudo apt-get check
check is a diagnostic tool; it updates the package cache and checks for broken
dependencies.
14) sudo apt-get download package_name
Download the package in the current directory
15) sudo apt-get clear
This command will clears out the local repository of retrieved package files. you can use the autoclean option instead. ( do not run for test only)
If You think there is any command that I should add in the list , Please comment below. I will definitely add that command.
Sharing is Caring 😀
15) sudo apt-get clear
This command will clears out the local repository of retrieved package files. you can use the autoclean option instead. ( do not run for test only)
If You think there is any command that I should add in the list , Please comment below. I will definitely add that command.
Sharing is Caring 😀
0 Comments