Prevent apt-get from running

214 Views Asked by At

I need to disable apt-get temporarily to get a specific "mode" of my Ubuntu-Workstation, where multiple users are working and nobody should be able to install any packages.

First idea was to open the lock-file under /var/lib/dpkg, to simulate an active run of apt-get, but I got there no success. Code I tried: tail -f /dev/null > <lockfile> &

Second idea was to disable access to apt-get via chmod 0 /usr/bin/apt-get. This works, but I think this is more than just dirty.

What else should I try?

1

There are 1 best solutions below

0
On

In this case it's best practice not to give the wheel role to those users. In that case, they can't use the sudo command, which is necessary to run apt-get install.