Package Management Print

  • 0

Ubuntu Tools – Package Management

This article provides essential commands for installing, updating, removing, and searching software packages on Ubuntu.


1) Update Package Lists

sudo apt update

2) Upgrade Installed Packages

# Upgrade all packages to latest version
sudo apt upgrade -y

# Upgrade including kernel and dependencies
sudo apt full-upgrade -y

3) Install a Package

# Syntax
sudo apt install package-name -y

# Example
sudo apt install htop -y

4) Remove a Package

# Remove a package but keep configuration files
sudo apt remove package-name -y

# Remove completely with configuration files
sudo apt purge package-name -y

5) Search for a Package

apt search package-name

6) Show Installed Package Information

apt show package-name

7) Clean Up Unused Packages

sudo apt autoremove -y
sudo apt clean

8) Using Snap Packages

# Install snap (if missing)
sudo apt install snapd -y

# Install package with snap
sudo snap install package-name

# List installed snap packages
snap list

# Remove snap package
sudo snap remove package-name

With these commands you can manage Ubuntu packages efficiently, keeping your system up to date and clean from unused software.


Was this answer helpful?

« Back