APT commands: Difference between revisions

From ALT Linux Wiki
No edit summary
Line 1: Line 1:
{{stub}}
=apt-get commands=
=apt-get commands=
==Update information about repositories==
==Update information about repositories==

Revision as of 12:27, 31 January 2024

Stub.png
Under construction.
This page is not finished yet and may lack substantial information.

apt-get commands

Update information about repositories

Initially need to get indexes, which contains actual sets of packages and links to it.

Note: This command need to run every time when:
  • you searching new version of package
  • you installing package
  • you upgrade installed packages
  • you use apt-cache


This running with next command:

# apt-get update

Example of running:

# apt-get update
Get:1 http://ftp.altlinux.org p10/branch/x86_64 release [4223B]
Get:2 http://ftp.altlinux.org p10/branch/x86_64-i586 release [1665B]
Get:3 http://ftp.altlinux.org p10/branch/noarch release [2844B]
Fetched 8732B in 0s (89.8kB/s)
Get:1 http://ftp.altlinux.org p10/branch/x86_64/classic pkglist [23.8MB]
Get:2 http://ftp.altlinux.org p10/branch/x86_64/classic release [137B]
Get:3 http://ftp.altlinux.org p10/branch/x86_64-i586/classic pkglist [17.4MB]
Get:4 http://ftp.altlinux.org p10/branch/x86_64-i586/classic release [142B]
Get:5 http://ftp.altlinux.org p10/branch/noarch/classic pkglist [7164kB]
Get:6 http://ftp.altlinux.org p10/branch/noarch/classic release [137B]
Reading Package Lists... Done
Building Dependency Tree... Done

After running of this command, apt will update own cache of new information.

System upgrade

Attention! In ALT Linux is not customary to partial system upgrade via apt-get upgrade! You can drop own system with using this command! You need use only apt-get dist-upgrade instead it.
Attention! Do not hurry to press ENTER or Y. Study carefully, what APT suggets to remove, replace, upgrade or install. Truly you accepted with his changes? Never don't add option -y for control of APT.


For upgrade system to actual condition (except kernel), use next command:

# apt-get dist-upgrade

Example of run:

Note: When for you need upgrade several packages, you need confirm action with enter Y
# apt-get dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be upgraded
  firefox libnss
2 upgraded, 0 newly installed, 0 removed and 0 not upgraded.
Need to get 59.2MB of archives.
After unpacking 2888kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.altlinux.org p10/branch/x86_64/classic libnss 3.89.0-alt1:p10+319679.40.8.1@1684328466 [1290kB]
Get:2 http://ftp.altlinux.org p10/branch/x86_64/classic firefox 112.0.2-alt0.p10.1:p10+319679.140.8.2@1684342590 [57,9MB]
Fetched 59.2MB in 2s (20.6MB/s)
Committing changes...
Preparing...                                                    #################################################################################################### [100%]
Updating / installing...
1: libnss-3.89.0-alt1                                           #################################################################################################### [ 25%]
2: firefox-112.0.2-alt0.p10.1                                   #################################################################################################### [ 50%]
Cleaning up / removing... 
3: firefox-110.0.1-alt0.p10.1                                   #################################################################################################### [ 75%]
4: libnss-3.88.1-alt1                                           #################################################################################################### [100%]
Done.