Answer the question
In order to leave comments, you need to log in
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
Turn off automatic updates and don't worry.
dpkg-reconfigure unattended-upgrades
Keep the solution in one line in the terminal (as root, of course):
dpkg --get-selections | sed 's/\sinstalled$/\thold/' | dpkg --set-selections
apt upgrade
this change for some reason does not affect. :-(
What's stopping you from just not updating?
Linux is not Windows 10, there are no forced updates, everything is purely voluntary.
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 questionAsk a Question
731 491 924 answers to any question