This implies that the package manager is still running. Probably you tried (unsuccessfully) to install or update and then tried to remove.
@R_G’s (rebooting) is probably the best option to return the system to a stable state. Otherwise, kill -9 27287
might have been my first try.