Linux (Ubuntu) Packages


This command will get information about the latest package versions and then upgrade them. Upgrades every package on the server

sudo apt update && sudo apt upgrade

PHP Libraries & Frameworks


Most of our PHP apps use Composer, which is a dependency and package manager for PHP.

To update our PHP apps using Composer, go to the root directory of the app (e.g. /var/www/api/) and run the command below.

composer update

It will say something about not running it as a root user, but we still have to. There are some conflicts with Node Version Manager and Composer which are resolved by running Composer as root.

Node Version Manager


Node Version Manager (nvm) allows us to use different versions of Node for different projects without conflict.

To update, get the latest curl installation script on their GitHub page. It should look similar to curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash, but possibly with a newer version.

Node Package Manager


Node Package Manager (npm) does as its name suggests, manages Node.js packages and their updates.

You’ll know a project is using Node.js and npm if you see a node_modules folder.

To update npm to the latest version

npm install -g npm@latest

To update packages

npm update [-g] [<pkg>...]

Note: Adding -g will update globally installed packages. To update specific packages, add the package names at the end of the command

Nextcloud ☁️ (Dealer Portal, etc.)


Nextcloud can be installed using snap (package manager), or manually. The steps to update Nextcloud servers using snap vs. manual installations are different, so it’s important to know the distinction.

The dealer portal uses snap, so updating is very simple.

sudo snap refresh nextcloud

Nextcloud Updating

If you see the above image after upgrading, run the command below.

sudo -u www-data php occ upgrade