Difference between revisions of "Updating Packages"

From rbachwiki
Jump to navigation Jump to search
 
Line 1: Line 1:
== Updating Packages in Ubuntu Server ==
== Updating Packages in Ubuntu Server ==
<ul style="text-align: left;">
 
<li>
Update the Package Index The APT package index is essentially a database of available packages from the repositories defined in the '''/etc/apt/sources.list file'''. To update the local package index with the latest changes made in repositories, type the following:
<p><strong>Update the Package Index</strong>: The APT package index is essentially a database of available packages from the repositories defined in the <strong>/etc/apt/sources.list</strong> file. To update the local package index with the latest changes made in repositories, type the following:</p>
sudo apt-get update
<blockquote class="yes"><strong>sudo apt-get update</strong></blockquote>
 
<p> </p>
Upgrade Packages Over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updated). To upgrade your system, first update your package index as outlined above, and then type:
</li>
sudo apt-get upgrade
<li>
 
<p><strong>Upgrade Packages</strong>: Over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updated). To upgrade your system, first update your package index as outlined above, and then type:</p>
If a package needs to install or remove new dependencies when being upgraded, it will not be upgraded by the '''upgrade''' command. For such an upgrade, it is necessary to use the '''dist-upgrade command'''.
<blockquote class="yes"><strong>sudo apt-get upgrade</strong></blockquote>
 
<p> </p>
Also, you may upgrade your entire Ubuntu system from one revision to another with dist-upgrade. For example, to upgrade from Ubuntu version 5.10 to version 6.06 LTS, you would first ensure the version 6.06 LTS repositories replace the existing 5.10 repositories in your computer's /etc/apt/sources.list, then simply issue the apt-get update command as detailed above, and finally, perform the actual upgrade by typing:
<p>If a package needs to install or remove new dependencies when being upgraded, it will not be upgraded by the <em>upgrade</em> command. For such an upgrade, it is necessary to use the dist-upgrade command.</p>
 
<p>Also, you may upgrade your entire Ubuntu system from one revision to another with dist-upgrade. For example, to upgrade from Ubuntu version 5.10 to version 6.06 LTS, you would first ensure the version 6.06 LTS repositories replace the existing 5.10 repositories in your computer's <strong>/etc/apt/sources.list</strong>, then simply issue the <strong>apt-get update</strong> command as detailed above, and finally, perform the actual upgrade by typing:</p>
sudo apt-get dist-upgrade
<blockquote class="yes"><strong>sudo apt-get dist-upgrade</strong></blockquote>
 
<p> </p>
After a fairly considerable amount of time, your computer will be upgraded to the new revision. Typically, some post-upgrade steps would be required as detailed in the upgrade notes for the revision you are upgrading to.
<p>After a fairly considerable amount of time, your computer will be upgraded to the new revision. Typically, some post-upgrade steps would be required as detailed in the upgrade notes for the revision you are upgrading to.</p>
Actions of the apt-get command, such as installation and removal of packages, are logged in the /var/log/dpkg.log log file.
<p>Actions of the <strong>apt-get</strong> command, such as installation and removal of packages, are logged in the /var/log/dpkg.log log file.</p>
 
</li>
 
<li>
===Remove a Package:===
<p><strong>Remove a Package</strong>: Removal of a package or packages is also a straightforward and simple process. To remove the nmap package installed in the previous example, type the following:</p>
Removal of a package or packages is also a straightforward and simple process. To remove the nmap package installed in the previous example, type the following:
<blockquote class="yes"><strong>sudo apt-get remove nmap</strong></blockquote>
sudo apt-get remove nmap
<p> </p>
 
<p> </p>
Tip: Multiple Packages: You may specify multiple packages to be installed or removed, separated by spaces.
<p><br /> Tip: <strong>Multiple Packages</strong>: You may specify multiple packages to be installed or removed, separated by spaces.</p>
</li>
</ul>


----
----
==[[#Updating Packages in Ubuntu Server|Back To Top]]-[[Main_Page| Home]] - [[Ubuntu_Tips|Category]]==
==[[#Updating Packages in Ubuntu Server|Back To Top]]-[[Main_Page| Home]] - [[Ubuntu_Tips|Category]]==

Latest revision as of 14:01, 17 August 2016

Updating Packages in Ubuntu Server

Update the Package Index The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file. To update the local package index with the latest changes made in repositories, type the following:

sudo apt-get update

Upgrade Packages Over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updated). To upgrade your system, first update your package index as outlined above, and then type:

sudo apt-get upgrade

If a package needs to install or remove new dependencies when being upgraded, it will not be upgraded by the upgrade command. For such an upgrade, it is necessary to use the dist-upgrade command.

Also, you may upgrade your entire Ubuntu system from one revision to another with dist-upgrade. For example, to upgrade from Ubuntu version 5.10 to version 6.06 LTS, you would first ensure the version 6.06 LTS repositories replace the existing 5.10 repositories in your computer's /etc/apt/sources.list, then simply issue the apt-get update command as detailed above, and finally, perform the actual upgrade by typing:

sudo apt-get dist-upgrade

  After a fairly considerable amount of time, your computer will be upgraded to the new revision. Typically, some post-upgrade steps would be required as detailed in the upgrade notes for the revision you are upgrading to. Actions of the apt-get command, such as installation and removal of packages, are logged in the /var/log/dpkg.log log file.


Remove a Package:

Removal of a package or packages is also a straightforward and simple process. To remove the nmap package installed in the previous example, type the following:

sudo apt-get remove nmap

Tip: Multiple Packages: You may specify multiple packages to be installed or removed, separated by spaces.


Back To Top- Home - Category