Debian / Ubuntu command notes for packages and service maintenance ...

APT-GET

  • Clean up non-existent data
    # apt-get autoclean
  • Update list
    # apt-get update
  • Install/update a package
    # apt-get install <pkg>
  • review dist-upgrade prior:
    # apt-get -Vsu -o Debug::pkgProblemResolver=yes dist-upgrade
  • Apply updates
    # apt-get -Vu upgrade
  • Upgrade all dependencies
    # apt-get -Vu dist-upgrade
  • Search cache
    # apt-cache search <pkg>
  • Remove and purge packages
    # apt-get --purge remove <pkg>

DPKG

  • Install/Update package
    # dpkg -i <pgk>
  • Check listing of installed packages
    # dpkg -l *<pkg>*
  • file belongs to
    # dpkg --search /path/to/file
  • List of file in package
    #dpkg -L <pkg>
  • Info about package
    # dpkg -s <pkg>

SERVICES

  • Manage services at init levels.
    # sysv-rc-conf
    # update-rc.d
Comment