### Update one package by name
apt --only-upgrade install <package-name>

--- APT - YUM Recovery Commands ---

U M O U N T

umount -l -f /path/to/hung/stale/mount-point

A P T

Start by using these commands (repeate and reorder as needed)

apt-get clean
apt-get autoclean
apt-get check
dpkg --configure -a
apt-get autoremove
apt-get update --fix-missing
apt-get -f install

Encourage at Dist Upgrade with a GUI: do-release-upgrade -d -f DistUpgradeViewGtk3
Cheat Sheet If this fails with a particular package id'd. And to use a large hammer...
dpkg --remove --force-remove-reinstreq <package name> 
Remove the package's very existance...
vi /var/lib/dpkg/status
Find the block for the package and remove it.
find / -mount -name <package name>* -print  
and remove those bits as well.  

Another way to get past a 'stuck' configuration is:
post.instillation
mv /var/lib/dpkg/info/<package name>.postinst /var/lib/dpkg/info/00-<package name>.postinst

Y U M

Clean Up Ab-Ended yum update
yum clean all
rm -rf /var/cache/yum
ls -ld /var/lib/rpm/__db.00*
rm -rf /var/lib/rpm/__db.00*
yum distro-sync
yum makecache
Get newest kernel headers
yum search kernel |egrep ^kernel | egrep uek |grep -v grep
yum kernel-uek-devel.x86_64
yum install kernel-uek-debug-devel.x86_64
yum install "kernel-devel-uname-r == $(uname -r)"
yum install kernel-headers-$(uname -r)
yum install kernel-headers kernel-devel
Useful commands
package-cleanup --dupes ### list dupes
package-cleanup --cleandupes ### remove dups
yum history
yum-complete-transaction --cleanup-only
A better way to remove w/o taking dependances out
rpm -e --justdb --nodeps <package name>
yum install httpd <package name>
udev issue
cd /lib/systemd/system
egrep IPAddressDeny *
Comment out that line ... in systemd-udevd.service
Fix a hung package
yum list installed <package name> ### find the name to use 
  yum clean all
If a file will not update note the name and remove it (and sometimes dependences).
yum remove <package name>
  yum update
Additonal Cleanup for YUM
List Dependancy Problems
package-cleanup --problems
 
list installed packages which are not available from currently configured repositories
package-cleanup --orphans
For more detail: yum list extras
 
display the RPMs that are not relied upon by any other RPM
package-cleanup --leaves
 
Get newest kernel headers
yum install "kernel-devel-uname-r == $(uname -r)"
    yum install linux-headers-$(uname -r)
To disable the priorities plugin
edit /etc/yum/pluginconf.d/priorities.conf and set enabled = 0.
After this change, next time you run yum update, you should not get any priority protections.

Valid HTML 4.0 Transitional