How to install Snap packages on Linux Mint 21

Installing Snap Packages on Linux Mint 21 is not as straightforward. If the snap package is installed without doing the steps below, it throws an error as below:

package snapd has no installation candidate.

However, snap can still be enabled, and snap packages installed on it.

To install snap, open a terminal window and enter the following commands:

$ cd /etc/apt/preferences.d <enter>
$ sudo mv nosnap.pref nosnap.pref.bk <enter>

To install snap, enter the following command:
$ sudo apt-get install snapd <enter>

Sometimes, there are packages that are only available as snap packages and there is no other choice but to enable snap on Linux Mint 21 to install them.