252 lines
9.9 KiB
Markdown
252 lines
9.9 KiB
Markdown
# Mises-à-jour
|
||
|
||
|
||
|
||
https://unix.stackexchange.com/questions/19470/list-available-updates-but-do-not-install-them
|
||
|
||
|
||
|
||
### Liste des m-à-j disponibles
|
||
|
||
**apt-get --just-print upgrade**
|
||
|
||
```bash
|
||
NOTE: Ceci n'est qu'une simulation !
|
||
apt-get a besoin des privilèges du superutilisateur
|
||
pour pouvoir vraiment fonctionner.
|
||
Veuillez aussi noter que le verrouillage est désactivé,
|
||
et la situation n'est donc pas forcément représentative
|
||
de la réalité !
|
||
Lecture des listes de paquets... Fait
|
||
Construction de l'arbre des dépendances
|
||
Lecture des informations d'état... Fait
|
||
Calcul de la mise à jour... Fait
|
||
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
|
||
python-colorama python-decorator python-pathlib2 python-scandir
|
||
Veuillez utiliser « apt autoremove » pour les supprimer.
|
||
Les paquets suivants seront mis à jour :
|
||
python-pip-whl python3-pip
|
||
2 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
|
||
Inst python3-pip [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all]) []
|
||
Inst python-pip-whl [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
Conf python3-pip (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
Conf python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
```
|
||
|
||
|
||
**aptitude search '~U' | wc -l**
|
||
|
||
```bash
|
||
aptitude search '~U' ✔ 528 09:00:01
|
||
i A python-pip-whl - Python package installer
|
||
i python3-pip - Python package installer
|
||
```
|
||
|
||
**apt list --upgradable**
|
||
|
||
```bash
|
||
apt list --upgradable SIGINT(2) ↵ 530 12:38:06
|
||
En train de lister... Fait
|
||
python-pip-whl/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
|
||
python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
|
||
```
|
||
|
||
**apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }'**
|
||
|
||
```bash
|
||
apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }' ✔ 532 12:41:41
|
||
python3-pip
|
||
python-pip-whl
|
||
```
|
||
|
||
**sudo apt-get -V -u upgrade**
|
||
|
||
```bash
|
||
sudo apt-get -V -u upgrade 100 ↵ 534 12:47:00
|
||
[sudo] password for bruno:
|
||
Lecture des listes de paquets... Fait
|
||
Construction de l'arbre des dépendances
|
||
Lecture des informations d'état... Fait
|
||
Calcul de la mise à jour... Fait
|
||
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
|
||
python-colorama (0.3.7-1)
|
||
python-decorator (4.1.2-1)
|
||
python-pathlib2 (2.3.0-1)
|
||
python-scandir (1.7-1)
|
||
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
|
||
Les paquets suivants seront mis à jour :
|
||
python-pip-whl (9.0.1-2.3~ubuntu1 => 9.0.1-2.3~ubuntu1.18.04.1)
|
||
python3-pip (9.0.1-2.3~ubuntu1 => 9.0.1-2.3~ubuntu1.18.04.1)
|
||
2 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
|
||
Il est nécessaire de prendre 1 766 ko dans les archives.
|
||
Après cette opération, 2 048 o d'espace disque supplémentaires seront utilisés.
|
||
Souhaitez-vous continuer ? [O/n]
|
||
```
|
||
|
||
**sudo apt-get -s -V -u upgrade**
|
||
|
||
```bash
|
||
sudo apt-get -s -V -u upgrade 1 ↵ 539 13:14:22
|
||
Lecture des listes de paquets... Fait
|
||
Construction de l'arbre des dépendances
|
||
Lecture des informations d'état... Fait
|
||
Calcul de la mise à jour... Fait
|
||
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
|
||
python-colorama (0.3.7-1)
|
||
python-decorator (4.1.2-1)
|
||
python-pathlib2 (2.3.0-1)
|
||
python-scandir (1.7-1)
|
||
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
|
||
Les paquets suivants seront mis à jour :
|
||
python-pip-whl (9.0.1-2.3~ubuntu1 => 9.0.1-2.3~ubuntu1.18.04.1)
|
||
python3-pip (9.0.1-2.3~ubuntu1 => 9.0.1-2.3~ubuntu1.18.04.1)
|
||
2 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
|
||
Inst python3-pip [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all]) []
|
||
Inst python-pip-whl [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
Conf python3-pip (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
Conf python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
```
|
||
|
||
**apt-get update > /dev/null && apt-get --just-print upgrade | grep "Inst "**
|
||
|
||
```bash
|
||
sudo apt-get update > /dev/null && apt-get --just-print upgrade | grep "Inst "
|
||
Inst python3-pip [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all]) []
|
||
Inst python-pip-whl [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
```
|
||
|
||
**apt-get dist-upgrade </dev/null**
|
||
|
||
```bash
|
||
sudo apt-get dist-upgrade </dev/null 100 ↵ 541 13:16:04
|
||
Lecture des listes de paquets... Fait
|
||
Construction de l'arbre des dépendances
|
||
Lecture des informations d'état... Fait
|
||
Calcul de la mise à jour... Fait
|
||
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
|
||
python-colorama python-decorator python-pathlib2 python-scandir
|
||
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
|
||
Les paquets suivants seront mis à jour :
|
||
python-pip-whl python3-pip
|
||
2 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
|
||
Il est nécessaire de prendre 1 766 ko dans les archives.
|
||
Après cette opération, 2 048 o d'espace disque supplémentaires seront utilisés.
|
||
Souhaitez-vous continuer ? [O/n] Annulation.
|
||
```
|
||
|
||
|
||
|
||
**apt list --upgradable**
|
||
|
||
```bash
|
||
apt list --upgradable ✔ 520 08:27:27
|
||
En train de lister... Fait
|
||
python-pip-whl/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
|
||
python3-pip/bionic-updates,bionic-updates 9.0.1-2.3~ubuntu1.18.04.1 all [pouvant être mis à jour depuis : 9.0.1-2.3~ubuntu1]
|
||
```
|
||
|
||
```bash
|
||
function a { read input;dpkg -l ${input} | grep " ${input} " | awk '{$1=$2=$3=$4="";print $0}' | sed 's/^ *//';unset input;};{ apt-get --just-print upgrade 2>&1 | perl -ne 'if (/Inst\s([\w,\-,\d,\.,~,:,\+]+)\s\[([\w,\-,\d,\.,~,:,\+]+)\]\s\(([\w,\-,\d,\.,~,:,\+]+)\)? /i) {print "$1 (\e[1;34m$2\e[0m -> \e[1;32m$3\e[0m)\n"}';} | while read -r line; do echo -en "$line $(echo $line | awk '{print $1}' | a )\n"; done;
|
||
|
||
python3-pip (9.0.1-2.3~ubuntu1 -> 9.0.1-2.3~ubuntu1.18.04.1) Python package installer
|
||
python-pip-whl (9.0.1-2.3~ubuntu1 -> 9.0.1-2.3~ubuntu1.18.04.1) Python package installer
|
||
```
|
||
|
||
|
||
|
||
apt-check is probably the most efficient scripting method.
|
||
|
||
**/usr/lib/update-notifier/apt-check 2>&1 | cut -d ';' -f 1**
|
||
|
||
A very small modification shows you only the security updates.
|
||
|
||
**/usr/lib/update-notifier/apt-check 2>&1 | cut -d ';' -f 2**
|
||
|
||
|
||
|
||
**apt-show-versions -u**
|
||
|
||
```bash
|
||
apt-show-versions -u ✔ 548 13:23:23
|
||
python-pip-whl:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu1.18.04.1
|
||
python3-pip:all/bionic-updates 9.0.1-2.3~ubuntu1 upgradeable to 9.0.1-2.3~ubuntu1.18.04.1
|
||
```
|
||
|
||
**sudo apt-get -qq update && apt-get -qq -s upgrade**
|
||
|
||
```bash
|
||
sudo apt-get -qq update && apt-get -qq -s upgrade 100 ↵ 547 13:23:11
|
||
NOTE: Ceci n'est qu'une simulation !
|
||
apt-get a besoin des privilèges du superutilisateur
|
||
pour pouvoir vraiment fonctionner.
|
||
Veuillez aussi noter que le verrouillage est désactivé,
|
||
et la situation n'est donc pas forcément représentative
|
||
de la réalité !
|
||
Inst python3-pip [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all]) []
|
||
Inst python-pip-whl [9.0.1-2.3~ubuntu1] (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
Conf python3-pip (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
Conf python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1 Ubuntu:18.04/bionic-updates [all])
|
||
```
|
||
|
||
|
||
|
||
### Infos sur un paquet
|
||
|
||
**apt-cache show <paquet>**
|
||
|
||
```bash
|
||
apt-cache show gcc-8-base ✔ 559 15:04:05
|
||
Package: gcc-8-base
|
||
Architecture: amd64
|
||
Version: 8.3.0-6ubuntu1~18.04.1
|
||
Multi-Arch: same
|
||
Priority: required
|
||
Section: libs
|
||
Source: gcc-8
|
||
Origin: Ubuntu
|
||
Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
|
||
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
|
||
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
|
||
Installed-Size: 113
|
||
Filename: pool/main/g/gcc-8/gcc-8-base_8.3.0-6ubuntu1~18.04.1_amd64.deb
|
||
Size: 18716
|
||
MD5sum: b231d33f61250fee66d1f4f41eebe9a0
|
||
SHA1: c56356523711c4b9f3f59cc4423254e4a293f46e
|
||
SHA256: 89415e0e9d940c81e33959f366f1bad1a94cfecacb538eb897be0e6038781a94
|
||
Homepage: http://gcc.gnu.org/
|
||
Description-en: GCC, the GNU Compiler Collection (base package)
|
||
This package contains files common to all languages and libraries
|
||
contained in the GNU Compiler Collection (GCC).
|
||
Description-md5: b6e93638a6d08ea7a18929d7cf078e5d
|
||
Task: minimal
|
||
Supported: 5y
|
||
|
||
Package: gcc-8-base
|
||
Architecture: amd64
|
||
Version: 8.3.0-6ubuntu1~18.04
|
||
Multi-Arch: same
|
||
Priority: required
|
||
Section: libs
|
||
Source: gcc-8
|
||
Origin: Ubuntu
|
||
Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
|
||
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
|
||
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
|
||
Installed-Size: 113
|
||
Filename: pool/main/g/gcc-8/gcc-8-base_8.3.0-6ubuntu1~18.04_amd64.deb
|
||
Size: 18648
|
||
MD5sum: ebd413aa6f179e38bb8e9f488b657fe6
|
||
SHA1: 95250c6482a359271804633e5a15ef3c8d38990f
|
||
SHA256: f94706768527e63e4a566d339897b3803b6cbb0a095f2bd267778110701e8508
|
||
Homepage: http://gcc.gnu.org/
|
||
Description-en: GCC, the GNU Compiler Collection (base package)
|
||
This package contains files common to all languages and libraries
|
||
contained in the GNU Compiler Collection (GCC).
|
||
Description-md5: b6e93638a6d08ea7a18929d7cf078e5d
|
||
Task: minimal
|
||
Supported: 5y
|
||
```
|
||
|
||
|
||
|