I tried this:
moncef@moncef-Latitude-E7270:~$ sudo apt install tor
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3321 (apt)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3321 (apt)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3321 (apt)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3321 (apt)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3321 (apt)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3321 (apt)... 5s
This is my command history:
109 sudo apt install ubuntu-restricted-extras
110 sudo snap install qbittorrent-arnatious
111 exit
112 shutdown -h now
113 systemctl poweroff -i
114 sudo
115 sudo apt install nmap
116 sudo dpkg --configure -a
117 sudo apt install nmap
118 nmap
119 history
120 sudo apt remove ubuntu-restricted-extras
121 sudo apt-get remove ubuntu-restricted-extras
122 sudo apt remove ubuntu-restricted-extras
123 sudo apt install tor
124 sudo apt-get install tor
125 sudo dpkg --configure -a
126 ps aux | grep -i apt
127 shutdown -h now
128 sudo apt install ubuntu-restricted-extras
129 sudo apt install tor
130 history
131 sudo apt install ubuntu-restricted-extras
132 history