Since I mainly use Debian-based Linux flavours, I have had to get used to the apt package manager which Debian uses. I find it a bit unintuitive to use, as there seem to be several different programs to do basic things.
Note: many of the apt commands shown below need to run as root, so you should prefix each command with ‘sudo’ if running as a normal user.
# apt update - this downloads package information from the internet on which packages/versions are available. N.B. it does not actually update any packages, it just updates the package manager’s catalogue/cache/list of what updates are available.
# apt upgrade - this performs the update of all packages which have updates available online. Note: you should always run an ‘apt update’ before running ‘apt upgrade’.
# apt install rclone - install a single package
# apt remove rclone - uninstall a single package
Note: you may see references to people using apt-get instead of apt when installing packages. apt-get is just a no-frills version of apt, and was designed for use in scripts or other unattended operation. So it doesn’t have the additional features of apt, such as download progress bars, coloured output etc. , but its functionality is identical to apt.
apt list --installed or # dpkg-query -l - List all installed packages
apt list --upgradeable - List which installed packages have upgrades available
apt list vim - check if a particular package is installed. Note : you can use wildcards, so apt list *zip will show zip, unzip, gzip, python3-indexed-zip , etc.
dpkg-query -L rclone - List all files inside an (installed) package
apt-cache search fail2ban - See if a particular package is available online
An apt update error I once saw:
# apt-get update
Get:1 http://security.debian.org buster/updates InRelease [65.4 kB]
Get:3 http://ftp.us.debian.org/debian buster InRelease [122 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists... Done
E: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
N: Repository 'http://ftp.us.debian.org/debian buster InRelease' changed its 'Version' value from '10.9' to '10.11'
.....
THE SOLUTION turned out to be :
# apt-get update --allow-releaseinfo-change
Useful additional packages that may not be installed by default:
sysstat- for ‘sar’ system performance 24x7 recordingtelnet- old-school tool, handy for troubleshootingwhois- domain/WHOIS lookupsrclone- useful for backupsfail2ban- for blocking IP addresses what keep trying to hack into younftables- new firewall, used by fail2banp7zip- useful for performance testing hard disks/SSDssamba-vfs-modules- for speeding up MacOS SMB clients