Skip to content

Latest commit

 

History

History
84 lines (57 loc) · 1.74 KB

File metadata and controls

84 lines (57 loc) · 1.74 KB

README

Demonstrates how to management various tasks with Apt

More apt examples 35_apt_and_dpkg

NOTE: This is very ubuntu flavoured.

TODO:

  • Pinning version
  • Patching.

Show out-of-date packages

# root shell
sudo su

# update apt cache
apt update

# show packages that can be upgraded
apt list --upgradable

Upgrade to next major release of the distro

dist-upgrade

Switch the HWE Kernel

Sometimes the version of the distro does not have the latest kernel features. This can be addressed by installing the HWE version.

# kernel upgrades with hwe
sudo apt-get install --install-recommends linux-generic-hwe-18.04 

Troubleshooting

Sometimes apt update will fail with key or tls failures

# apt update failures
sudo apt update

# show lists
ls -l /var/lib/apt/lists

# you can remove the lists but they will be recreated if you still have sources
rm /var/lib/apt/lists/*

# remove repositories list (target the removal to packages that are failing)
ls -l /etc/apt/sources.list
ls -l /etc/apt/sources.list.d

# removes line from sources
sudo add-apt-repository -r "line entry in sources.list"

# stop trusting keys
sudo apt-key del <keyid>

Building from Source

# add src sources
sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt update

# make and install
apt-get source git
./configure --prefix=$HOME/myapps
make
make install

Resources

  • How to install program locally without sudo privileges? here