====== Prevent specific packages from being installed in apt======
Package: xfce4-power-manager
Pin: release *
Pin-Priority: -1
Package: xfce4-power-manager-data
Pin: release *
Pin-Priority: -1
root@misaka:~# apt install xfce4-power-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package xfce4-power-manager is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
xfce4-power-manager-data
E: Package 'xfce4-power-manager' has no installation candidate
root@misaka:~# apt install xfce4-power-manager-data
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package xfce4-power-manager-data is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'xfce4-power-manager-data' has no installation candidate
root@misaka:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.3 (stretch)
Release: 9.3
Codename: stretch
root@misaka:~# apt --version
apt 1.4.8 (amd64)
root@misaka:~# apt-get --version
apt 1.4.8 (amd64)
Supported modules:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
Pkg: Debian APT solver interface (Priority -1000)
Pkg: Debian APT planner interface (Priority -1000)
S.L: 'deb' Debian binary tree
S.L: 'deb-src' Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian Translation Index
Idx: Debian dpkg status file
Idx: Debian deb file
Idx: Debian dsc file
Idx: Debian control file
Idx: EDSP scenario file
Idx: EIPP scenario file
===== See Alsos =====
* https://askubuntu.com/questions/75895/how-to-forbid-a-specific-package-to-be-installed
{{tag>apt}}