Ubuntu notes

things to do after installing Ubuntu

sudo apt update && sudo apt upgrade -y
sudo apt install build-essential
sudo apt install ubuntu-restricted-extras

some Ubuntu commands

using apt

# search for packages
apt search {package-name}

# show package info
apt show {package-name}

# list upgradeable packages
apt list --upgradable

# list installed packages
apt list --installed

# list all available packages
apt list --all-versions

# update apt repository
sudo apt update

# upgrade installed packages with available updates
sudo apt upgrade

# same as upgrade except system upgrade will remove installed packages if needed
sudo apt full-upgrade

# install package
sudo apt install {package-name}

# remove package but not config file
sudo apt remove {package-name}

# remove package and config file
sudo apt purge {package-name}

# autoremove apt repository
sudo apt autoremove

using dpkg

Syntax: dpkg [option...] action

dpkg actions

# install package-file if not installed. otherwise, upgrade package
dpkg -i {package-file}
dpkg --install {package-file}

# install all packages recursively from directory
dpkg -R -i {directory}
dpkg --recursive --install {directory}

# remove an installed package (but not config files)
dpkg -r {package}
dpkg --remove {package}

# remove all unpacked packages marked to be removed (but not config files)
dpkg -r -a
dpkg --remove --pending

# purge an installed or already removed package (including config files)
dpkg -P {package}
dpkg --purge {package}

dpkg-deb actions

# list contents of a deb package
dpkg -c archive
dpkg --contents archive

dpkg-query actions

# list packages matching given pattern
dpkg -l {package-name-pattern}
dpkg --list {package-name-pattern}

# search for a filename from installed packages
dpkg -s {package-name}
dpkg --status {package-name}

# list files installed to your system from {package-name}
dpkg -L {package-name}
dpkg --listfiles {package-name}

# search for a filename from installed packages
dpkg -S {filename-search-pattern}
dpkg --search {filename-search-pattern}

# display detail about {package-name}
dpkg -p {package-name}
dpkg --print-avail {package-name}

common Ubuntu packages


  • vscode
  • android studio
  • clion
  • datagrip
  • intellij idea
  • pycharm
  • rider


  • sqlite3
  • mysql-server
  • mysql-workbench
  • postgres (todo)


  • shutter


  • wmctrl

© 2020 | Paul Kim