I want to perform multiple apt operations, llike sudo apt install ubuntu-gnome-desktop
in one terminal and sudo apt remove lubuntu-desktop
in another terminal. When I try to do this I get this (Please don't ask me why I had installed these desktops; I had done so many experiments on Ubuntu that I had to reinstall it many times due to breaking the system)
$ sudo apt autoremove
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
I can do only one operations in at one time with apt!!
I know that it is not safe to break lock but I will take all risk on my own!!
My question is not a duplicate of this as i want to know about how to do in multiple terminals. I know these ways apt install package1 package2
and apt install package1 && apt remove package2
. If do this apt install pack1 && apt remove pack2
then I have to wait a long time for pack1 to install.
Also will it work if I break the lock?