Different Linux distributions use different command-line package managers:
Always refresh the package list before installing software.
sudo apt update
Use the package manager to install a package by name. Dependencies are installed automatically.
sudo apt install nginx
Confirm that the software is installed and working.
nginx -v
Remove a package while keeping its configuration files.
sudo apt remove nginx
Remove the package along with all configuration files.
sudo apt purge nginx
Remove automatically installed packages that are no longer required.
sudo apt autoremove
Search available packages in repositories.
apt search apache
Some software can be installed using alternative package systems.
sudo snap install vlc
flatpak install flathub org.videolan.VLC
Linux software management via the command line is centralized, secure, and efficient, allowing easy installation, removal, updating, and maintenance of applications.