Apt: Difference between revisions

From DWIKI
 
(8 intermediate revisions by the same user not shown)
Line 14: Line 14:
==Extract files from .deb==
==Extract files from .deb==
  dpkg-deb
  dpkg-deb
==Pin a version==
*[https://help.ubuntu.com/community/PinningHowto Pinning Howto]
==List installed packages==
apt list --installed


= FAQ =
= FAQ =
Line 27: Line 34:
== have been kept back ==
== have been kept back ==


Usually means you should run dist-upgrade
Usually means you should run


 
apt install <kept-back-package>
or
apt upgrade packagename
 
otherwise
  apt dist-upgrade


==Unable to correct problems, you have held broken packages.==
==Unable to correct problems, you have held broken packages.==
Line 44: Line 56:
==Could not handshake: The TLS connection was non-properly terminated.==
==Could not handshake: The TLS connection was non-properly terminated.==
try http instead of https
try http instead of https
==Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead==
fart a lot


==Depends: but it is not going to be installed==
==Depends: but it is not going to be installed==
Line 62: Line 70:
==Prevent restarting all services when installing a package==
==Prevent restarting all services when installing a package==
  NEEDRESTART_MODE=i apt install somepackage
  NEEDRESTART_MODE=i apt install somepackage
==What repository provides package==
apt policy <packagename>
==Error messages==
===Key is stored in legacy trusted.gpg keyring===
Check [https://itsfoss.com/apt-key-deprecated/  apt-key is deprecated]
===Certificate verification failed: The certificate is NOT trusted.===
try
deb [trusted=yes] ...
in sources.list, but things might be worse than that, in case of launchpad change to
https://ppa.launchpadcontent.net/
==The following upgrades have been deferred due to phasing==
apt install <whatever package it lists>

Latest revision as of 09:31, 5 November 2024

Debian/Ubuntu package manager

 

Unattended upgrades

Disable unattended upgrades

In /etc/apt/apt.conf.d/20auto-upgrades

APT::Periodic::Unattended-Upgrade "0";

HOWTO

Extract files from .deb

dpkg-deb

Pin a version


List installed packages

apt list --installed

FAQ

Show version of packages before installing

apt-get -s install somepackage

or

apt install madison-lite
apt-cache madison somepackage

or

apt-show packagename

have been kept back

Usually means you should run

apt install <kept-back-package>

or

apt upgrade packagename

otherwise

 apt dist-upgrade

Unable to correct problems, you have held broken packages.

Try

dpkg --get-selections | grep hold

What packages depend on package

apt-cache rdepends --installed libc6-dev

Clear cache

apt-get clean

Could not handshake: The TLS connection was non-properly terminated.

try http instead of https

Depends: but it is not going to be installed

First try

apt-get update && apt-get upgrade

E: Unable to correct problems, you have held broken packages.

Which services should be restarted?

That's from needrestart


Prevent restarting all services when installing a package

NEEDRESTART_MODE=i apt install somepackage

What repository provides package

apt policy <packagename>

Error messages

Key is stored in legacy trusted.gpg keyring

Check apt-key is deprecated


Certificate verification failed: The certificate is NOT trusted.

try

deb [trusted=yes] ...

in sources.list, but things might be worse than that, in case of launchpad change to

https://ppa.launchpadcontent.net/


The following upgrades have been deferred due to phasing

apt install <whatever package it lists>