Friday, August 12, 2022

APT package manager - command-line interface

sudo apt update && sudo apt upgrade

apt list --upgradable

apt list ?obsolete // show obsolete packages

sudo apt full-upgrade

sudo apt edit-sources // edit repositories

sudo nano /etc/apt/sources.list // edit repositories

ls /etc/apt/sources.list.d // list additional repositories files

  GNU nano 7.2                                  /etc/apt/sources.list 
# deb cdrom:[Kubuntu 22.10 _Kinetic Kudu_ - Alpha amd64 (20220920)]/ kinetic main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu kinetic main restricted universe multiverse

## Major bug fix updates produced after the final release of the distribution.
deb http://archive.ubuntu.com/ubuntu kinetic-updates main restricted universe multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu kinetic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu kinetic-security main restricted universe multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

sudo apt install package // reinstall remove purge autoremove

sudo apt --purge autoremove

apt search package // ^ * ?

apt show package // information about package

apt list *package*

apt list | grep package

apt list --installed | grep package

apt depends package // rdepends

sudo apt-mark hold package // holding means it can not be upgraded till you run unhold

sudo apt-mark unhold package

man apt OR apt --help

sudo apt-key list // find the key id in /etc/apt/trusted.gpg

sudo apt-key del B455BEF0

Advanced Package Tool

No comments:

Post a Comment