LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

apt-update

Download package indexes from configured sources.

TLDR

Refresh the package lists
$ sudo apt update
copy
Refresh quietly
$ sudo apt update -q
copy
Use a specific configuration file
$ sudo apt update -c [path/to/apt.conf]
copy
Print the index URIs and do not download them
$ apt update --print-uris
copy

SYNOPSIS

apt update [options]

DESCRIPTION

apt update resynchronizes the package index files from the sources in `/etc/apt/sources.list` and `/etc/apt/sources.list.d/`. After it finishes, apt install and apt upgrade see the current package versions.The command is a subcommand of apt. apt-get update does the same work. Updating the index does not install or upgrade packages.

PARAMETERS

-q, --quiet

Produce less output. Repeat for quieter logs.
--print-uris
Print the URIs of the index files. Do not download them.
-c, --config-file file
Read the named APT configuration file.
-o, --option key=value
Set a configuration option for this run.
-h, --help
Show help and exit.

INSTALL

sudo apt install apt
copy
sudo dnf install apt
copy
sudo pacman -S apt
copy
sudo apk add apt
copy
brew install apt
copy
nix profile install nixpkgs#apt
copy

CAVEATS

A failed signature check or an unreachable mirror leaves the previous index in place for that source and reports an error. Root is required to write `/var/lib/apt/lists/`.

SEE ALSO

apt(8), apt-get(8), apt-install(8), apt-cache(8)

RESOURCES

Copied to clipboard
Kai