أداة سطر الأوامر APT – دليل الاستخدام العملي لإدارة الحزم على التوزيعات الدبيانية

دليل تطبيقي لشرح استخدام أداة سطر الأوامر apt كجزء من مدير الحزم APT

مقدمة

إن سبق لك أن استخدمت توزيعة دبيان أو إحدى الأنظمة المبنية عليها مثل أوبنتو أو لينكس منت؛ فعلى الأغلب أنك قد تعاملت سلفًا مع الأمر apt. في هذا المقال سنتعرف إلى كيفية استعمال مختلف صيغ هذا الأمر مع أمثلة عملية حية. لكن قبل ذلك دعونا نتعرف إلى مفهوم APT.

ما APT؟

كلمة APT هي اختصار لعبارة “Advanced Package Manager”: مدير الحزم وأداة سطر الأوامر للتعامل معها على أنظمة دبيان وما بني عليها كتوزيعات Ubuntu و Linux Mint و MX Linux. تسمح لك هذه الأداة بالبحث، التثبيت، الحذف والترقية وغيرها من الوظائف التي تُجرى على الحزم. تجمع أداة سطر الأوامر apt بين أهم وظائف الأمرين apt-get و apt-cache.

كيف يُستخدم؟

نحتاج في أغلب الأوامر إلى استعمال صلاحيات المستخدم الخارق (Superuser) أو الجذر (Root). لذلك سنستخدم أداة sudo في الأمثلة الآتية.

1. تحديث مستودعات الحزم

يتم في هذه العملية تحميل معلومات وصفية محدثة عن جميع الحزم المتوفرة في المستودعات. بفضل هذه العملية يمكن للنظام التعرف على الحزم الجديدة والمحدثة. لذلك يُنصح بإجرائها بعد تثبيت النظام مباشرة، وقبل عمليات ترقيته.

sudo apt update

linuxaw@linuxaw:~$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu impish InRelease                     
Hit:2 http://us.archive.ubuntu.com/ubuntu impish-security InRelease            
Hit:3 http://us.archive.ubuntu.com/ubuntu impish-updates InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu impish-backports InRelease
Hit:5 http://apt.pop-os.org/proprietary impish InRelease
Hit:6 http://apt.pop-os.org/release impish InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
34 packages can be upgraded. Run 'apt list --upgradable' to see them.

2. ترقية جميع حزم النظام

تسمح هذه العملية بترقية جميع حزم البرامج والنظام إلى النسخ الأحدث المتاحة في المستودعات.

sudo apt upgrade
linuxaw@linuxaw:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-5.15.8-76051508 linux-headers-5.15.8-76051508-generic
  linux-image-5.15.8-76051508-generic linux-modules-5.15.8-76051508-generic
The following packages will be upgraded:
  firefox firefox-locale-ar firefox-locale-de firefox-locale-en
  firefox-locale-es firefox-locale-fr firefox-locale-it firefox-locale-ja
  firefox-locale-pt firefox-locale-ru firefox-locale-zh-hans
  firefox-locale-zh-hant gnome-settings-daemon gnome-settings-daemon-common
  gnome-shell-extension-cosmic-dock libpop-upgrade-gtk libsmbclient
  libwbclient0 linux-generic linux-headers-generic linux-image-generic
  linux-libc-dev linux-system76 pop-cosmic pop-shell pop-upgrade samba-libs
  ubuntu-release-upgrader-core update-manager-core xserver-common
  xserver-xephyr xserver-xorg-core xserver-xorg-legacy xwayland
34 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
20 standard security updates
Need to get 191 MB of archives.
After this operation, 546 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

3. الترقية الشاملة لحزم النظام

يمكن استعمال أمر آخر لترقية النظام

sudo apt full-upgrade

الفرق بين الخيارين upgrade و full-upgrade هو أن upgrade يُحدِّث الحزم إلى النسخ الأحدث فقط، أما الخِيار full-upgrade فيُحدِّث الحزم إلى النسخ الأحدث مع تثبيت وحذف بعض الحزم الإضافية إن احتاج إلى ذلك.

linuxaw@linuxaw:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-5.15.8-76051508 linux-headers-5.15.8-76051508-generic
  linux-image-5.15.8-76051508-generic linux-modules-5.15.8-76051508-generic
The following packages will be upgraded:
  firefox firefox-locale-ar firefox-locale-de firefox-locale-en
  firefox-locale-es firefox-locale-fr firefox-locale-it firefox-locale-ja
  firefox-locale-pt firefox-locale-ru firefox-locale-zh-hans
  firefox-locale-zh-hant gnome-settings-daemon gnome-settings-daemon-common
  gnome-shell-extension-cosmic-dock libpop-upgrade-gtk libsmbclient
  libwbclient0 linux-generic linux-headers-generic linux-image-generic
  linux-libc-dev linux-system76 pop-cosmic pop-shell pop-upgrade samba-libs
  ubuntu-release-upgrader-core update-manager-core xserver-common
  xserver-xephyr xserver-xorg-core xserver-xorg-legacy xwayland
34 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
20 standard security updates
Need to get 191 MB of archives.
After this operation, 546 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

يمكن جمع أمر تحديث المستودعات وأمر تحديث النظام في أمر واحد.

sudo apt update && sudo apt upgrade

sudo apt update && sudo apt full-upgrade

4. تثبيت الحزم

في هذه العملية يتم تحميل حُزْمَة معينة وتثبيتها على النظام. تثبيت الحُزْمَة يتطلب معرفة اسمها.

sudo apt install package_name

linuxaw@linuxaw:~$ sudo apt install screenfetch
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  giblib1 libid3tag0 libimlib2 scrot
The following NEW packages will be installed:
  giblib1 libid3tag0 libimlib2 screenfetch scrot
0 upgraded, 5 newly installed, 0 to remove and 34 not upgraded.
Need to get 339 kB of archives.
After this operation, 1328 kB of additional disk space will be used.
Do you want to continue? [Y/n] 

يمكن تثبيت عدة حزم بأمر واحد عبر كتابة أسماء الحزم بشكل متتال مع الفصل بينها بفراغ (Space)

sudo apt install package_1 package_2 package_3

linuxaw@linuxaw:~$ sudo apt install htop inxi pluma
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gir1.2-pluma-1.0 hddtemp lm-sensors mate-desktop-common mesa-utils
  pluma-common tree
Suggested packages:
  libcpanel-json-xs-perl | libjson-xs-perl libxml-dumper-perl fancontrol
  read-edid i2c-tools
The following NEW packages will be installed:
  gir1.2-pluma-1.0 hddtemp htop inxi lm-sensors mate-desktop-common mesa-utils
  pluma pluma-common tree
0 upgraded, 10 newly installed, 0 to remove and 34 not upgraded.
Need to get 3792 kB of archives.
After this operation, 33.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

5. إعادة تثبيت الحزم

لإعادة تثبيت الحُزْمَة من جديد في حال حدث مشكل في عملها أو في حال حذف بعض ملفاتها بالخطأ نستخدم الأمر الآتي

sudo apt reinstall package_name

linuxaw@linuxaw:~$ sudo apt reinstall neofetch
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 34 not upgraded.
Need to get 84.3 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 neofetch all 7.1.0-3 [84.3 kB]
Fetched 84.3 kB in 1s (117 kB/s)
(Reading database ... 199084 files and directories currently installed.)
Preparing to unpack .../neofetch_7.1.0-3_all.deb ...
Unpacking neofetch (7.1.0-3) over (7.1.0-3) ...
Setting up neofetch (7.1.0-3) ...
Processing triggers for man-db (2.9.4-2) ...

6. حذف الحزم

يتم في هذه العملية حذف الحزم مع الإبقاء على ملفات إعداداتها.

sudo apt remove package_name

linuxaw@linuxaw:~$ sudo apt remove inxi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  hddtemp tree
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  inxi
0 upgraded, 0 newly installed, 1 to remove and 34 not upgraded.
After this operation, 1143 kB disk space will be freed.
Do you want to continue? [Y/n] 

7. حذف الحزم مع ملفات الإعدادات

هذا الأمر يحذف الحزم مع جميع ملفات إعداداتها المحفوظة خارج مجلد المنزل (داخل مجلد etc مثلا). أما في حال كانت عملية حفظ ملفات الإعدادات -لحزمة أو برنامج ما- تتم داخل مجلد المنزل فإن هذا الأمر لا يؤثر عليها. يفيد هذا الأمر في حال رغبت في استعادة الإعدادات الافتراضية لبرنامج معين أو في حال عبثت بإعداداته ولم تعرف مكان حفظ ملفاتها.

sudo apt purge package_name

linuxaw@linuxaw:~$ sudo apt purge mousepad
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgtksourceview-3.0-1 libgtksourceview-3.0-common libxfce4util-bin
  libxfce4util-common libxfce4util7 libxfconf-0-3 xfconf
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  mousepad*
0 upgraded, 0 newly installed, 1 to remove and 34 not upgraded.
After this operation, 2016 kB disk space will be freed.
Do you want to continue? [Y/n] 

8. حذف الاعتماديات غير المهمة

عند تثبيت حُزْمَة معينة يقوم مدير الحزم تِلْقائيًا بتثبيت الحزم التي تعتمد عليها هذه الحُزْمَة، لكن عند حذف هذه الحُزْمَة وعدم الحاجة إلى اعتمادياتها مستقبلا تبقى هذه الاعتماديات مثبتة على النظام. لحذفها نستخدم الأمر الآتي

sudo apt autoremove

linuxaw@linuxaw:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libgtksourceview-3.0-1 libgtksourceview-3.0-common libxfce4util-bin
  libxfce4util-common libxfce4util7 libxfconf-0-3 xfconf
0 upgraded, 0 newly installed, 7 to remove and 34 not upgraded.
After this operation, 4869 kB disk space will be freed.
Do you want to continue? [Y/n]

9. البحث عن الحزم

هذه العملية تُمكِِّنك من البحث عن كلمة أو نص معين في اسم أو وصف الحزم. نتيجة البحث هي اسم الحُزْمَة، إصدارها، معماريتها، حالتها ونبذة عنها.

apt search search_term

linuxaw@linuxaw:~$ apt search smplayer
Sorting... Done
Full Text Search... Done
libdvd-pkg/impish,impish 1.4.2-1-1 all
  DVD-Video playing library - installer

smplayer/impish 20.6.0~ds0-1 amd64
  Complete front-end for MPlayer and mpv

smplayer-l10n/impish,impish 20.6.0~ds0-1 all
  Complete front-end for MPlayer and mpv - translation files

smplayer-themes/impish,impish 1:20.11.0-1 all
  complete front-end for MPlayer - icon themes

smtube/impish 18.3.0-1build1 amd64
  YouTube videos browser

10. عرض المعلومات عن الحزم

يُستعمل هذا الأمر لإظهار المعلومات عن حُزْمَة معينة مثل إصدارها، اعتمادياتها، حجمها قبل وبعد التثبيت، المستودع الذي تنتمي إليه ووصفها.

apt show package_name

linuxaw@linuxaw:~$ apt show smplayer
Package: smplayer
Version: 20.6.0~ds0-1
Priority: optional
Section: universe/graphics
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4571 kB
Depends: mpv (>= 0.6.2) | mplayer, libc6 (>= 2.14), libgcc-s1 (>= 3.0), libqt5core5a (>= 5.14.1), libqt5dbus5 (>= 5.14.1), libqt5gui5 (>= 5.14.1) | libqt5gui5-gles (>= 5.14.1), libqt5network5 (>= 5.14.1), libqt5widgets5 (>= 5.14.1), libqt5xml5 (>= 5.1), libstdc++6 (>= 5), libx11-6, zlib1g (>= 1:1.1.4)
Recommends: smplayer-themes, smplayer-l10n
Homepage: http://smplayer.sourceforge.net/
Download-Size: 1945 kB
APT-Sources: http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
Description: Complete front-end for MPlayer and mpv
 Qt5 front-end for mplayer and forks, with basic features like playing
 videos, DVDs, and VCDs to more advanced features like support
 for MPlayer filters and more. One of the most interesting features
 of SMPlayer: it remembers the settings of all files you play.
 So you start to watch a movie but you have to leave... don't
 worry, when you open that movie again it will resume at the same
 point you left it, and with the same settings: audio track,
 subtitles, volume...

11. عرض جميع الحزم المثبتة

يُمكِّنك هذا الأمر من إظهار جميع الحزم المثبتة على النظام مع إصدارها ومعماريتها.

apt list --installed

لتسهيل التنقل ورؤية كامل الحزم المطلوبة يمكن استعمال الأداة more

apt list --installed | more

linuxaw@linuxaw:~$ apt list --installed | more

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Listing...
accountsservice/impish,now 0.6.55-0ubuntu14.1pop0~1637764729~21.10~e674d1d amd64
 [installed,automatic]
acl/impish,now 2.2.53-10ubuntu2 amd64 [installed,automatic]
acpi-support/impish,now 0.143build1 amd64 [installed,automatic]
acpid/impish,now 1:2.0.32-1ubuntu2 amd64 [installed,automatic]
adduser/impish,impish,now 3.118ubuntu5 all [installed]
adwaita-icon-theme-full/impish,impish,now 40.1.1-1ubuntu1 all [installed,automat
ic]
adwaita-icon-theme/impish,impish,now 40.1.1-1ubuntu1 all [installed,automatic]
alsa-base/impish,impish,now 1.0.25+dfsg-0ubuntu7 all [installed,automatic]
alsa-topology-conf/impish,impish,now 1.2.5.1-2 all [installed,automatic]
alsa-ucm-conf/impish-updates,impish-updates,now 1.2.4-2ubuntu5 all [installed,au
tomatic]
alsa-utils/impish,now 1.2.4-1ubuntu4 amd64 [installed,automatic]
amd64-microcode/impish,now 3.20191218.1ubuntu2 amd64 [installed,automatic]
apg/impish,now 2.2.3.dfsg.1-5build1 amd64 [installed,automatic]
app-install-data-partner/impish,impish,now 21.10 all [installed,automatic]
app-install-data/impish,impish,now 15.10 all [installed,automatic]
apparmor/impish,now 3.0.3-0ubuntu1 amd64 [installed,automatic]
appmenu-gtk-module-common/impish,impish,now 0.7.6-2 all [installed,automatic]
appmenu-gtk2-module/impish,now 0.7.6-2 amd64 [installed,automatic]
appmenu-gtk3-module/impish,now 0.7.6-2 amd64 [installed,automatic]
--More--

يمكن أيضا استعمال الأمر grep إن كنت تريد عرض حُزْمَة محددة.

apt list --installed | grep package_name

linuxaw@linuxaw:~$ apt list --installed | grep inxi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

inxi/impish,impish,now 3.3.06-1-1 all [installed]

12. عرض جميع الحزم المتاحة للترقية

هذا الأمر يُظهِر الحزم التي يمكن ترقيتها.

apt list --upgradeable

linuxaw@linuxaw:~$ apt list --upgradeable
Listing... Done
firefox-locale-ar/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-de/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-en/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-es/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-fr/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-it/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-ja/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-pt/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-ru/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-zh-hans/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox-locale-zh-hant/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
firefox/impish-security,impish-updates 95.0.1+build2-0ubuntu0.21.10.1 amd64 [upgradable from: 95.0+build1-0ubuntu0.21.10.1]
gnome-settings-daemon-common/impish,impish 40.0.1-1ubuntu3pop0~1639691325~21.10~3bcd31b all [upgradable from: 40.0.1-1ubuntu3pop0~1632861569~21.10~ad4dc3d]
gnome-settings-daemon/impish 40.0.1-1ubuntu3pop0~1639691325~21.10~3bcd31b amd64 [upgradable from: 40.0.1-1ubuntu3pop0~1632861569~21.10~ad4dc3d]
gnome-shell-extension-cosmic-dock/impish,impish 70~ubuntu1pop0~1639487648~21.10~3c3f377 all [upgradable from: 70~ubuntu1pop0~1638972762~21.10~1f6d034]
libpop-upgrade-gtk/impish 1.0.0~1639771550~21.10~d87beb5 amd64 [upgradable from: 1.0.0~1634054676~21.10~c80dc0b]
libsmbclient/impish-security,impish-updates 2:4.13.14+dfsg-0ubuntu0.21.10.4 amd64 [upgradable from: 2:4.13.14+dfsg-0ubuntu0.21.10.3]
libwbclient0/impish-security,impish-updates 2:4.13.14+dfsg-0ubuntu0.21.10.4 amd64 [upgradable from: 2:4.13.14+dfsg-0ubuntu0.21.10.3]
linux-generic/impish 5.15.8.76051508.202112141040~1639505278~21.10~0ede46a amd64 [upgradable from: 5.15.5.76051505.202111250933~1638201579~21.10~09f1aa7]
linux-headers-generic/impish 5.15.8.76051508.202112141040~1639505278~21.10~0ede46a amd64 [upgradable from: 5.15.5.76051505.202111250933~1638201579~21.10~09f1aa7]
linux-image-generic/impish 5.15.8.76051508.202112141040~1639505278~21.10~0ede46a amd64 [upgradable from: 5.15.5.76051505.202111250933~1638201579~21.10~09f1aa7]
linux-libc-dev/impish 5.15.8-76051508.202112141040~1639505278~21.10~0ede46a amd64 [upgradable from: 5.15.5-76051505.202111250933~1638201579~21.10~09f1aa7]
linux-system76/impish 5.15.8.76051508.202112141040~1639505278~21.10~0ede46a amd64 [upgradable from: 5.15.5.76051505.202111250933~1638201579~21.10~09f1aa7]
pop-cosmic/impish,impish 0.1.0~1639487583~21.10~9bc4666 all [upgradable from: 0.1.0~1639168473~21.10~914a05e]
pop-shell/impish,impish 1.1.0~1639174177~21.10~de901ae all [upgradable from: 1.1.0~1638899293~21.10~6a49503]
pop-upgrade/impish 1.0.0~1639771550~21.10~d87beb5 amd64 [upgradable from: 1.0.0~1634054676~21.10~c80dc0b]
samba-libs/impish-security,impish-updates 2:4.13.14+dfsg-0ubuntu0.21.10.4 amd64 [upgradable from: 2:4.13.14+dfsg-0ubuntu0.21.10.3]
ubuntu-release-upgrader-core/impish 1.0.0~1639771550~21.10~d87beb5 amd64 [upgradable from: 1.0.0~1634054676~21.10~c80dc0b]
update-manager-core/impish 1.0.0~1639771550~21.10~d87beb5 amd64 [upgradable from: 1.0.0~1634054676~21.10~c80dc0b]
xserver-common/impish-security,impish-security,impish-updates,impish-updates 2:1.20.13-1ubuntu1.1 all [upgradable from: 2:1.20.13-1ubuntu1]
xserver-xephyr/impish-security,impish-updates 2:1.20.13-1ubuntu1.1 amd64 [upgradable from: 2:1.20.13-1ubuntu1]
xserver-xorg-core/impish-security,impish-updates 2:1.20.13-1ubuntu1.1 amd64 [upgradable from: 2:1.20.13-1ubuntu1]
xserver-xorg-legacy/impish-security,impish-updates 2:1.20.13-1ubuntu1.1 amd64 [upgradable from: 2:1.20.13-1ubuntu1]
xwayland/impish-security,impish-updates 2:21.1.2-0ubuntu1.1 amd64 [upgradable from: 2:21.1.2-0ubuntu1]

لتسهيل التنقل ورؤية كامل الحزم المطلوبة يمكن استعمال more

apt list --upgradeable | more

يمكن أيضا استخدام الأمر grep إن كنت تريد عرض حُزْمَة معينة.

apt list --upgradeable | grep package_name

linuxaw@linuxaw:~$ apt list --upgradeable | grep xwayland

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

xwayland/impish-security,impish-updates 2:21.1.2-0ubuntu1.1 amd64 [upgradable from: 2:21.1.2-0ubuntu1]

13. عرض جميع الحزم المتاحة في المستودعات

يعرض هذا الأمر جميع الحزم المتوفرة في المستودعات سواء المثبتة منها، القابلة للتحديث أو غير المثبتة.

apt list --all-versions

لتسهيل التنقل ورؤية كامل الحزم المطلوبة يمكن استعمال الأداة more

apt list --all-versions | more

linuxaw@linuxaw:~$ apt list --all-versions | more

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Listing...
0ad-data-common/impish,impish 0.0.25b-1 all

0ad-data/impish,impish 0.0.25b-1 all

0ad/impish 0.0.25b-1 amd64

0install-core/impish 2.16-1 amd64

0install/impish 2.16-1 amd64

0xffff/impish 0.9-1 amd64

2048-qt/impish 0.1.6-2build1 amd64

2048/impish 0.20210105.1243-1 amd64

2ping/impish,impish 4.5-1 all

2to3/impish,impish 3.9.4-1build1 all

2vcard/impish,impish 0.6-4 all

--More--

يمكن بواسطة إضافة الأمر grep عرض حُزْمَة معينة.

apt list --all-versions | grep package_name

linuxaw@linuxaw:~$ apt list --all-versions | grep atril

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

atril-common/impish,impish 1.26.0-0ubuntu1 all
atril/impish 1.26.0-0ubuntu1 amd64
gir1.2-atril/impish 1.26.0-0ubuntu1 amd64
gir1.2-atrildocument-1.5.0/impish 1.26.0-0ubuntu1 amd64
gir1.2-atrilview-1.5.0/impish 1.26.0-0ubuntu1 amd64
libatrildocument-dev/impish 1.26.0-0ubuntu1 amd64
libatrildocument3/impish 1.26.0-0ubuntu1 amd64
libatrilview-dev/impish 1.26.0-0ubuntu1 amd64
libatrilview3/impish 1.26.0-0ubuntu1 amd64

14. التعديل على مصادر المستودعات

هذا الأمر يُمكِّنك من فتح مِلَفّ مصادر المستودعات بواسطة محرر النصوص والتعديل عليها، يشمل ذلك إضافة وحذف وتعطيل المستودعات.

sudo apt edit-sources

ملاحظات

  • يمكن استعمال الإعداد y- للموافقة مباشرة على الأوامر إن أمكن ذلك من أجل ربح الوقت.
  • يمكن استخدام الإعداد d- أو download-only– مع أي أمر يتطلب تحميل الحزم من أجل تحميلها فقط دون تثبيتها.
  • يمكن استعمال الإعداد no-download– من أجل استعمال الحزم المحملة على النظام فقط دون تحميل أي حزم أخرى من المستودعات.

خاتمة

كان هذا دليلنا المبسط لاستخدام أوامر الأداة apt. بكل تأكيد؛ يحتاج التعود على إدارة الحزم بهذه الطريقة لبعض من الممارسة والوقت. إلى ذلك الحين يمكنك العودة لهذا المقال كلما رأيت ضرورة لذلك، ويمكنك أيضا استدعاء الدليل المرفق في سطر الأوامر إن احتجت إليه

man apt
مسرور
مسرور
15
حزين
حزين
1
متحمس
متحمس
10
نعسان
نعسان
0
غاضب
غاضب
0
متفاجئ
متفاجئ
2
معاذ جِيجلي
معاذ جِيجلي
المقالات: 72