What to do if the terminal send "apt-key is deprecated"

I am trying to install wine. Following the commands indicated for Wine installation that I placed with bullets. I received a WARNING stating "apt-key is deprecated". I am not sure what to do here.

Here are the steps I did:

yd@yd:~$ sudo dpkg --add-architecture i386
[sudo] password for yd:
yd@yd:~$ wget -nc https://dl.winehq.org/wine-builds/winehq.key 
  sudo apt-key add winehq.key

--2021-06-17 18:04:43--  https://dl.winehq.org/wine-builds/winehq.key
Resolving dl.winehq.org (dl.winehq.org)... 151.101.194.217, 151.101.130.217, 151.101.66.217, ...
Connecting to dl.winehq.org (dl.winehq.org)|151.101.194.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3220 (3.1K) [application/pgp-keys]
Saving to: ‘winehq.key’
winehq.key          100%[===================>]   3.14K  --.-KB/s    in 0s      
2021-06-17 18:04:43 (8.93 MB/s) - ‘winehq.key’ saved [3220/3220]
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
yd@yd:~$ sudo apt-key add winehq.key
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

After this , I am supposed to add two other commands:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt install --install-recommends winehq-stable

I do not know what to do about this warning message.

  1. Should I continue with the last two commands
  2. should I deal with the warning message. if yes, how?
  3. can I revert the installation command I already did? if yes, how?

Solution 1:

You are trying to install Wine directly from their repository, and not from Ubuntu's. You only have installed the gpg key, with a warning (not an error).

The easieast path would be to install Wine from Ubuntu's repository (you problably don't need the latest updates). Type on the terminal:

sudo apt install wine

or

sudo apt install wine64