Some Computer Hints


Ubuntu Updating

To make updates from Web run:

# apt update        ## update the package lists for upgrade
# apt upgrade       ## upgrade packages
# apt dist-upgrade  ## upgrade the kernel also

I generally use the following alias to manually check and install updates and remove old and unneeded packages:

alias upd='apt autoclean && apt autoremove && apt update \
 && apt dist-upgrade && cat /run/reboot-required* 2>/dev/null'

If there any errors during apt update, then run the following once:

# apt update -o Acquire::CompressionTypes::Order::=gz

To install a new package:

# apt install package-name

To just make a simulation run (without installing anything):

$ apt -s install package-name

To configure all (possibly) yet not configured packages:

# dpkg --configure -a

To list installed packages enter:

$ apt --installed list

To remove a package and for clean up use:

# apt remove --purge package-name
# apt autoremove
# apt autoclean

To remove residual configurations from old package releases:

# apt purge $(dpkg -l | grep '^rc ' | awk '{print $2}')

To upgrade to new Ubuntu release:

# /usr/bin/do-release-upgrade

To list Ubuntu server components or tasks (a group of packages that will add a server functionality):

$ tasksel --list-tasks

To install a server task:

# tasksel install server-task

Note that tasksel is not installed by default.


To list files contained in an installed package:

$ dpkg -L package-name
$ dpkg-query -L package-name

To list files contained in a package that is not yet installed in your local system:

$ apt-file list package-name

To find out the name of the installed package that provides a file:

$ dpkg -S file-path

To find out the name of a package that is not yet installed in your local system and provides a file:

$ apt-file -F search file-path

Note: Remove -F to search for partial matches of file-path:

$ apt-file search partial-file-path

For firmware updates; use

$ fwupdmgr get-devices

to get a list of updateable devices on your system, as supported by the Linux Vendor Firmware Service (LVFS);

$ fwupdmgr get-updates

to get a list of all available firmware updates; and

# fwupdmgr update

to update all firmware to latest versions available.