Here are some commonly used apt-get flags:
-
update: Updates the package index files from their sources.sudo apt-get update -
upgrade: Upgrades all the installed packages to their latest versions.sudo apt-get upgrade -
dist-upgrade: Upgrades packages and handles changing dependencies with new versions of packages.sudo apt-get dist-upgrade -
remove: Removes a specified package but leaves its configuration files.sudo apt-get remove package-name -
purge: Removes a specified package along with its configuration files.sudo apt-get purge package-name -
autoremove: Removes packages that were automatically installed to satisfy dependencies for other packages and are no longer needed.sudo apt-get autoremove -
clean: Clears out the local repository of retrieved package files.sudo apt-get clean -
install: Installs a specified package.sudo apt-get install package-name -
search: Searches for a specified package in the package index.apt-cache search package-name -
show: Displays detailed information about a specified package.apt-cache show package-name
These flags can be combined with other options to customize the behavior of the apt-get command.
