APT commands: Difference between revisions

From ALT Linux Wiki
No edit summary
Line 34: Line 34:


==System upgrade==
==System upgrade==
{{attention|In ALT Linux [[APT в ALT Linux/Советы по использованию#apt-get_upgrade|не принято выполнять частичное обновление системы]] через '''apt-get upgrade'''! Этой командой вы практически гарантировано свою систему поломаете! Используйте только '''apt-get dist-upgrade''' вместо неё.}}
{{attention|Не торопитесь нажимать {{button|ENTER}} или {{button|Y}} в ответ! Внимательно изучите, что APT предлагает удалить, заменить, обновить и установить нового. Вы правда согласны с его предложением!? Никогда не добавляйте «'''-y'''», чтобы контролировать намерения APT'а.}}
For upgrade system to actual condition ([[Kernel update|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}}
<source lang="text" highlight="1">
# 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.
</source>

Revision as of 12:11, 31 January 2024

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 не принято выполнять частичное обновление системы через apt-get upgrade! Этой командой вы практически гарантировано свою систему поломаете! Используйте только apt-get dist-upgrade вместо неё.
Attention! Не торопитесь нажимать ENTER или Y в ответ! Внимательно изучите, что APT предлагает удалить, заменить, обновить и установить нового. Вы правда согласны с его предложением!? Никогда не добавляйте «-y», чтобы контролировать намерения 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.