Difference between revisions of "Apt update"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
* https://manpages.ubuntu.com/manpages/kinetic/man8/apt.8.html
 
* https://manpages.ubuntu.com/manpages/kinetic/man8/apt.8.html
 +
 +
[[apt update --help]]
 +
 +
 
  [[apt]] update
 
  [[apt]] update
 
  [[apt -qq]] update
 
  [[apt -qq]] update

Revision as of 15:42, 19 February 2023

apt update --help


apt update
apt -qq update
apt update -y && apt upgrade -y > /tmp/apt-upgrade-output 2>&1 &
apt -qq update -y && apt -qq upgrade -y
apt -qqq update -y && apt -qqq upgrade -y; echo $?


apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Get:5 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Fetched 64.4 kB in 2s (34.2 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
98 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt update
Hit:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:5 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,489 kB]
Get:6 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [24.9 kB]
Fetched 2,766 kB in 1s (3,199 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
apt -qq update
98 packages can be upgraded. Run 'apt list --upgradable' to see them.
--qq quiet and yes
apt update > /dev/null

could not get lock

Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 34612 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/

GPG error

apt update
.../...
Reading package lists... Done
W: GPG error: http://downloads.linux.hpe.com/SDR/repo/mcp focal/current Release: The following signatures couldn't be verified because the public key is not available: 
NO_PUBKEY C208ADDE26C2B797
E: The repository 'http://downloads.linux.hpe.com/SDR/repo/mcp focal/current Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Solution:
A)  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C208ADDE26C2B797
B) deb [trusted=yes] http://www.your_not_trustedcert.org jessie main

Errors

apt update NO_PACKAGE_AS_ARGUMENT
E: The update command takes no arguments
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository

Related terms

See also

Advertising: