{"id":21287,"date":"2023-09-27T10:14:05","date_gmt":"2023-09-27T10:14:05","guid":{"rendered":"https:\/\/linuxways.net\/?p=21287"},"modified":"2023-09-27T10:14:05","modified_gmt":"2023-09-27T10:14:05","slug":"how-to-install-software-packages-with-apt-in-linux-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-software-packages-with-apt-in-linux-ubuntu\/","title":{"rendered":"How to Install Software Packages With APT in Linux\/Ubuntu?"},"content":{"rendered":"<p>A software can be installed in Linux in many ways. To run centralized applications, we can build our own executables. Apart from our own executables, we can use AppImage as well to install and run centralized applications. All Linux Distributions consist of a Package Management System. Most of the Linux distros use the \u201c<strong>Apt<\/strong>\u201d package management library that handles the management of applications including the installation and removal.<\/p>\n<p>This article discusses how we can install software packages using apt.<\/p>\n<h2><strong>How to Install Software Packages With APT in Linux\/Ubuntu?<\/strong><\/h2>\n<p>APT or Advanced Package Tool handles the installation and removal of packages and software in Ubuntu. It works by downloading packages from repositories. We can use APT in many ways for different purposes. Most of the APT commands can be run with sudo privileges. The most common commands with APT are:<\/p>\n<ol>\n<li>apt install<\/li>\n<li>apt update<\/li>\n<li>apt upgrade<\/li>\n<li>apt remove<\/li>\n<li>apt list<\/li>\n<\/ol>\n<h2><strong>How to Install Software Using apt?<\/strong><\/h2>\n<p>The \u201capt install\u201d installs a package from a specified repository and you can install the package using the syntax:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> <span class=\"sy0\">&lt;<\/span>package-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>If we want to install \u201cVLC\u201d, we can use the apt install command as follows:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> vlc<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"409\" class=\"wp-image-21288\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-1.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-1-300x169.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>It will take some time and once it is installed we can access the application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"457\" class=\"wp-image-21289\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-2.png 599w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-2-300x229.png 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/p>\n<h2><strong>How to Update Software Using apt?<\/strong><\/h2>\n<p>The <strong>APT Update<\/strong> command is used to update\/refresh packages in the repository. It updates the package index file. Thus before installing any new package, it is highly recommended to update the system repository by the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt update<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"599\" class=\"wp-image-21290\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-3.png 734w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-3-300x245.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<h2><strong>How to Upgrade Software Using apt?<\/strong><\/h2>\n<p>Now once the packages in the repository are updated, we need to install them as well. APT Upgrade upgrades the actual packages installed in our system. To upgrade the updated packages in the system, use the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt upgrade<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"288\" class=\"wp-image-21291\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-4.png 720w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-4-300x120.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/p>\n<h2><strong>How to Remove Software Using apt?<\/strong><\/h2>\n<p>The APT Remove is used to uninstall the given package. To uninstall an installed package we use the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt remove <span class=\"sy0\">&lt;<\/span>package-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>The remove command uninstalls the package but it might leave some configuration files in our system. To remove the package with all of its configuration as well, use the purge command instead of remove:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt purge <span class=\"sy0\">&lt;<\/span>package-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>In the example below we purge \u201cvlc\u201d from our system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt purge vlc<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"714\" height=\"696\" class=\"wp-image-21292\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-5.png 714w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-5-300x292.png 300w\" sizes=\"auto, (max-width: 714px) 100vw, 714px\" \/><\/p>\n<h2><strong>How to List Software Using apt?<\/strong><\/h2>\n<p>APT List lists all the packages. The \u201clist\u201d command can be executed as:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt list<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"685\" class=\"wp-image-21293\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-6.png 709w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-6-300x290.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/p>\n<p>We can also filter our list. To retrieve only the list of packages that are upgradeable, we can use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt list <span class=\"re5\">-upgradeable<\/span><\/div><\/div>\n<p>This will only list the packages that can be upgraded:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"129\" class=\"wp-image-21294\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-7.png 712w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21287-7-300x54.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/p>\n<p>That\u2019s all about installing, updating, upgrading, listing, and removing a software package using APT in Linux\/Ubuntu.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>To install packages with APT in Linux\/Ubuntu, the \u201csudo apt install &lt;package-name&gt;\u201d command is used. \u201capt\u201d is the package management tool in Linux distributions, like Ubuntu 22.04. It allows you to install, update, upgrade, remove, list, and manage packages. In this article, we covered the different methods of the APT Package Management Library covering the installation procedure, the updating procedure, the upgradation procedure, and the process of removal and listing of packages.<\/p>","protected":false},"excerpt":{"rendered":"<p>Linux Distros uses the \u201capt\u201d package management system to install, update, upgrade, remove, list, and manage packages in other ways.<\/p>","protected":false},"author":110,"featured_media":21295,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-21287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=21287"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21287\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/21295"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=21287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=21287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=21287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}