U
U
uuuu2020-01-31 01:53:40
linux
uuuu, 2020-01-31 01:53:40

How to prevent all packages from being upgraded in Ubuntu?

How to prevent updating of all packages in Ubuntu server 18.04?
I know that this must be done through the command "sudo aptitude hold package_name" and "sudo apt-mark hold package_name".
But these commands are for specific packages, how to set hold for all packages at once?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vadim Priluzkiy, 2020-01-31
@Oxyd

Turn off automatic updates and don't worry.
dpkg-reconfigure unattended-upgrades
dpkg-reconfigure-unattended-upgrades.png

A
AUser0, 2020-01-31
@AUser0

Keep the solution in one line in the terminal (as root, of course):

dpkg --get-selections | sed 's/\sinstalled$/\thold/' | dpkg --set-selections

Although apt upgradethis change for some reason does not affect. :-(

K
ky0, 2020-01-31
@ky0

Comment out all repositories in /etc/apt?

S
SagePtr, 2020-01-31
@SagePtr

What's stopping you from just not updating?
Linux is not Windows 10, there are no forced updates, everything is purely voluntary.

S
shurshur, 2020-01-31
@shurshur

The essence of the question is not very clear. If you just do not install or update anything, then nothing will be updated. Or do you want nothing to be updated by dependencies, including no libraries, but you can install new packages? This is almost without options, if you do not sit on a very stable branch and your own frozen package mirror, because a new version of a package in a regularly updated repository may depend on new versions of libraries for which the old version is already not in the repository.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question