$ sudo apt-get install google-chrome-stable -s You can easily check which version of the held package installed and the package offered from the repo by running apt-get install on the package with the -s (“simulate”) switch, which reports the package versions: The following packages have been kept back:ģ upgraded, 0 newly installed, 0 to remove and 1 not upgraded.Īfter this operation, 39.9 kB of additional disk space will be used. Now when we run an upgrade using apt-get, the held package will be ignored: You can read up more about the different package statuses, how to check them and what they mean in the dpkg-query manpage. Where the “hi” at the beginning of the line stands for “hold” and “installed”. (note it’s dpkg that requires root privileges, not echo) $ echo "google-chrome-stable hold" | sudo dpkg -set-selections One is to use dpkg again, using –set-selections to set the package flags. ![]() For this purpose we need to hold the package. The package manager records packages as flagged in one or more of various states, such as installed (or set to be installed), not installed (or set to be removed) or held. $ dpkg -i /var/cache/apt/archives/google-chrome-stable_.77-1_bĢ) Prevent the next apt-get update or dist-update from upgrading the package It’s simple enough to replace the most recent with the previous version using dpkg. var/cache/apt/archives/google-chrome-stable_.102-1_b var/cache/apt/archives/google-chrome-stable_.77-1_b $ ls -l /var/cache/apt/archives/google-chrome-stable* Now we find the packages in the apt package cache: There in the apt logfile is the output of the apt-get command that installed the package we want to replace, version. Setting up google-chrome-stable (.102-1). Unpacking replacement google-chrome-stable. Preparing to replace google-chrome-stable. $ sudo cat /var/log/apt/term.log | grep google-chrome-stable First find the problematic package version: Once you’ve got the hang of Debian/Ubuntu’s package management system and have had a fine time smoothly upgrading your system periodically, at some point the inevitable will happen: while upgrading a package something will get installed that will break something else.ġ) Remove and downgrade the problem package But apt-get is most people’s first choice, the most straightforward, and the one which comes with no obvious switch or option included – the following demonstrates how. ![]() ![]() There are a number of different options, from powerful but complex dpkg, it’s more user-friendly brother aptitude, to the full blown X-windows GUI of synaptic. The most common Debian package manager frontend is apt-get. So we need to reverse this, by downgrading the package to the previous version, and then prevent it from being reinstalled automatically. It could be, as happened to me recently, a version of Google Chrome that won’t play nice with some element of Gnome or the GTK toolkit – any button on a webpage that should launch a dialogue box took minutes to do so. Once you’ve got the hang of Debian/Ubuntu’s package management system and have had a fine time smoothly upgrading your system periodically, at some point the inevitable will happen: while upgrading a package will get installed that will break something.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |