Prevent Application Updates With ‘APT-MARK’

While unwise, there are times when you need to prevent application updates. You can do this with ‘apt-mark’ and this article will explain how. Obviously, this method is only effective if you use a Linux distro that has an APT-based package manager.

For the most part, you should always keep your software updated. However, that’s a rule for the Ideal World®. For the rest of us, those of us that live in the Real World®, you’ll almost certainly run into an eventuality that requires you to keep an existing, specific version of software.

While entirely stupid and irresponsible, I kept a version of Thunderbird past its due date because the update simply ruined my existing installation. I only kept that outdated version long enough to make the leap to a more recent distro version. The tool I used to prevent application updates was apt-mark.

You will have your own reasons, from compliance to stability to functionality, for keeping the same version of your installed software. You should only use this sparingly, only as necessary, when there’s simply no other solution. This should also be a temporary measure. You should always try to use the upgraded software because there are (possibly) security implications if you don’t.

A little about APT

While we’ll technically be using ‘apt-mark‘, it should be mentioned that APT stands for Advanced Package Tool. It’s the default package manager that is used in many distros, mostly Debian and those of Debian descent. So, you’ll see it in everything from Ubuntu to Linux Mint. 

In the desktop scene, I suspect it’d be the most common of all package management tools. Even if you use a different distro with a different package manager, you should probably have a basic familiarity.

Using ‘apt-mark’ hold and unhold

The tool we’ll be using is ‘apt-mark’, and the man page helpfully defines it as:

apt-mark – show, set and unset various settings for a package

We’ll only be concentrating on a couple of commands, those necessary when you want to prevent application updates, plus one extra command that will help you keep track of the two commands we’ll be focusing on.

The first of those two commands is ‘hold’. This command is used when you want to ‘hold’ a package at its current version, preventing upgrades. Remember, this should really be used only when there’s no other solution, as many upgrades fix security issues as well as bugs. It’s actually a fairly simple command.

When you enter this command, you’ll get a confirmation message. It will tell you that the application is now being held. It will remain held until you ‘unhold’ it. So, it’s a set-it-and-forget-it type of deal, though you shouldn’t really forget it. You should undo it as soon as you realistically can.

To reverse the restriction, resuming your normal updates, you simply need to ‘unhold’ it. The command is fairly obvious, and it looks like this:

That will free the hold on the package and tell you that the hold has been lifted. The package should then upgrade as necessary and as issued. If new upgrades show up in the repositories, it should function as normal and upgrade like it did prior to the hold.

If you are like me, you may well forget that you’ve held packages back. The package names are often long and nonsensical, so they’re easy to forget. In the heat of the moment, you may have forgotten to make a note of the package(s) you’ve held.

Don’t worry, ‘apt-mark’ has you covered! When you want to know what packages are being held, just run this command:

Note the lack of ‘sudo’ in that command. You don’t need sudo because you don’t need elevated permissions to list held packages. You only need elevated permission if you want to change something. As that command only lists them, you can run it as a normal user.

The apt-mark command has a ton of other uses, this is not an all-inclusive article. You can always see the man page for more help and the rest of the features. This article is only covering the ‘hold’ and ‘unhold’ functions. Maybe there will be another article covering other aspects, but this limited in scope – preventing application updates.

Like always, thanks for reading and I appreciate the feedback! Don’t forget that the site has ads enabled and that you can donate. So, if this article helped you learn how to prevent application updates then show some love! Otherwise, sign up for the newsletter or share this article with your friends on social media. Thanks!

 

When Did I Install Linux? (Expanded Edition!)

In the other site’s version of this article, I only had information for Ubuntu. This time, I’ll expand it to cover the major distros. It seems like a good a time as any to fix this. (I’d link to the original article, but that page will now direct here.)

I’m not sure why you’d want to know when you installed Linux. I suspect that reason mostly curiosity that people ask, “When did I install Linux?” The question pops up with some regularity.

It’s really not vital information, and as such, it’s not a generic command that you can run to retrieve the information. There isn’t a whole lot I can do with the answer, except maybe jar a few memories loose. “Oh, yeah… That’s when I installed, so I must have bought the computer around that time!”

Really, this isn’t all that important. Still, it’s a fairly often asked question. If you have found a real use for this information, please feel free to leave a comment and to let us know why you need this information.

Let’s get on with it, shall we!

When Did I Install Linux?

Like many exercises, this one starts with opening up your default terminal. You can use your keyboard, by just pressing CTRL + ALT + TOnce you have the terminal open, you can use the following commands to see when you installed Linux.

Ubuntu/Debian/Derivatives:

If that doesn’t work, you can also use:

NOTE: Change /sda1 to the disk where you installed Linux.

Fedora/RedHat/Derivatives:

Arch/Manjaro/Derivatives:

And, there you have it. You now know how to check to see when you installed Linux. If you use some obscure distro (or have other ways to get this information) please feel free to leave a comment.

This article was revamped due to a comment from Wiz at Linux.org. They mentioned that they’d used the previous article and that they wanted the information for other distros. So, that feedback does work – even if it may take months to happen. Seriously, leave feedback and I’ll do what I can.

Finally, and as always, thanks for reading. You may have not noticed, but the site is now running ads from Google. It’d be great if you whitelisted this domain, but it’s okay if you don’t. Don’t forget the newsletter, that you can donate, contribute an article, and that you can share this article with your friends. 

How Long is my Ubuntu Support Going to Last?

Ubuntu versions, and official flavors, have different lengths of time that they’re supported. Today, we’ll learn how to tell how much longer you have Ubuntu support and what you can do about it.

Every two years, Ubuntu releases a LTS version. That means “Long Term Support” and the support length for that is usually 3 years, and then it enters ESM, which means Extended Security Maintenance. Except when they don’t, and you get 5 years of support and 10 years of ESM.

Ubuntu’s official flavors have LTS versions that also come out every two years. Those are supported for three years and then you have no access to the flavor-specific updates unless you update to the newest LTS version of said official flavor.

Every six months, Ubuntu releases an ‘interim’ release. These releases are supported for nine months, which means you have a three month window to upgrade to the next version before the upgrade window closes. These releases also explore new versions of software that will make it into the LTS releases.

LTS releases are always YY.04 releases, but not all YY.04 releases are in fact LTS releases. They’re only LTS releases if the year of release was an even year. So, 18.04 and 20.04 are all LTS releases and there won’t be another LTS release until 22.04 –  which, according to Ubuntu’s versioning format will be in April of 2022.

Confused yet?

I can’t blame you if you are! After all, unless you spend all your time learning about this sort of stuff then you’re not going to remember that. At best, you have the “proper” configuration and you upgrade when your OS tells you to upgrade. If you’re using an interim release and miss that upgrade notice then it can be quite an ordeal to upgrade to a new version.

Let’s figure this out.

How To: Check Ubuntu Support Status

Fortunately, you can check your support status pretty easily. The results may be confusing, but you’ll figure it out.

Like so many articles, let’s crack open the terminal. Just use your keyboard and press CTRL + ALT + T to open your default terminal emulator.

If you’re using 18.04 or older, then you use the following command:

If you’re using 18.10 or newer, then you’d use this:

Your output will look something like this:

Which, as you can see, says I have support until 2025. If I had ESM enabled, that’s software from the Ubuntu Advantage program, then I’d have security updates even longer. As you may recall, that requires Snap apps, and I’ve chosen to disable Snap Applications. So, obviously I won’t be doing that whole ESM thing. 

Not that it matters with the ESM, because I’m using Lubuntu. Where it says 2025, I have to assume “official support” to only last until 2023 – three years of support. Now, you can keep using an official flavor beyond those three years, it’s just that the official flavor parts won’t be getting any additional updates. That’s generally considered a Bad Idea®. But, you can do so, and that’s why the date for ending Ubuntu support is later than it really is.

Anyhow, that should make it more clear. You should find the end date of your OS’s support and keep that in mind. You should make plans to upgrade in a timely manner, because security updates are important to you and the rest of the ‘net.

NOTE: When your computer isn’t upgraded you’re a threat not just to yourself. You risk becoming compromised and becoming part of a botnet, spamming relay node, or worse. So, keep things upgraded. Thanks!

Like always, thanks for reading. You can participate by contributing articles, donating, or sharing the links with others. You can also sign up for the newsletter. I promise, I won’t send you any spam!

How do I ‘Boot to USB’? (Or CD/DVD, if Such is Available)

In order to install Linux, you need to be able to boot to USB (or CD/DVD – with USB being more common these days and many devices not even having CD/DVD drives). The goal of this article is to help you boot to USB or to optical media, so that you can install or repair your Linux system.

To install Linux you pretty much have to boot to USB or to a CD or DVD. It’s true, you can actually install directly from your regular disk drive, but that’s a convoluted method that few people will ever need. I may cover that method at some point, but today is not that day!

You may also need to boot to a live Linux instance for other reasons. Maybe you need to repair your installation? Perhaps you need to grow your partition because you have run out of room? Or, just maybe, you need to recover your data so that you can do a fresh installation – or so that you can start the recovery from your backed up data?

It’d be rather pointless to enumerate the many reasons why you’d want to boot to USB. There are many reasons and it’s a skill you’re going to need. Trust me, you need to know this stuff.

I say USB because that’s the most common today, but you may also need to boot to CD or DVD. Your hardware may actually be so old that it won’t even let you boot to USB. So, for the sake of this article, let’s just assume you’re booting to some form of external media, be it USB, optical media, or even an SD card. No matter what you’re trying to boot as an alternative media, the process is pretty much the same.

Booting to USB

Booting to USB, what’s the purpose? The purpose is to install or repair an already running system. It means booting to something other than your default internal drive (under normal configurations) and using that booted media to effect change on your system.

As I said above, there are many reasons why you’d want to do this. It’s a pretty common thing, especially among Linux users. There are many questions asked about this process and I’ve decided to document the methods here.

However, there’s no way I can possibly make this article truly definitive. In fact, I’d appreciate it if you’d help. In the comments section, fill in the blanks for me. You have hardware that I may not have access to, so you can tell us what works for your hardware and the article will be a more complete source of information. It’s your time to shine!

How to Boot to USB

In order to boot to USB, you have to have fairly good timing – or a willingness to sit there and pound on the same key over and over again. In a traditional sense, you’re aiming for a boot selection menu that you can access after POST (Power On Self-Test) and that split-second before the OS starts its boot sequence.

You’re not trying to access the BIOS, you’re trying to access the boot selection menu and there’s a narrow window to get it right. The good news is that the key to access the BIOS is different than the key to access the alternative boot menu. So, a good working strategy is to press the right key on your keyboard over and over again during boot while hoping for the best.

The question is, which is the right key? You don’t want the BIOS menu, unless you plan on changing it permanently. You only want the temporary boot menu, which another animal entirely.

So, I have a bunch of hardware. I also have a search engine. I’ve made an attempt to find the temporary boot menu keys and to document them all in one place.

The list of keys!

     Acer: ESC, F2, or F12
     Apple/Mac: OPTION
     Asus: F8 or ESC
     Compaq: ESC or F9
     Dell: F12
     HP: ESC or F9
     Lenovo: F8, F10, or F12
     MSI: F11
     NEC: F5
     Packard Bell: F8
     Samsung: ESC, F2, or F12
     Sony: F1, F2, or F3
     Toshiba: F12

NOTE: This list isn’t exhaustive nor is it completely accurate. In some cases, you may need to actually enable this in your BIOS. Samsung, for example, will not show the temporary boot selection menu unless you’ve first disabled “Fast Boot”. Other OEMs may require similar changes.

The above keys should get you into the temporary boot menu, where you can choose to boot to USB, CD/DVD, an external drive, a microSD card, or whatever. It’s an essential step in both booting and repairing your Linux computer. It’s a good idea to memorize it once you know which one works for you.

As I mentioned above, you can help. If you have a device that’s not listed, please let me know in the comments. Some manufacturers have more than one way to access the screen, so be sure to let me know if your device is different. The more data we get, the more people we can help.

Thanks for reading! As always, feedback is fantastic, you can sign up for the newsletter, and you can donate. You don’t have to donate. The site will remain online regardless, but you can help cover the costs. If I keep this schedule up, we should have a new article in two more days – so stay tuned!

Is My System Capable of 32 or 64 Bit Linux?

There are a number of situations where you may not be sure if your CPU supports 32 or 64 bit Linux. If you want to know, it’s pretty easy to see if it supports 32 or 64 bit. If nothing else, it’s always good to know what your CPU architecture is and thus know which distros are compatible with your hardware.

You simply might not know this information. You wouldn’t be alone in that. These sort of questions pop up fairly regularly at the various support sites.

Maybe you were still new to Linux when you installed? Or maybe you’re working on a system that you yourself didn’t install? Perhaps you just don’t remember? There are a number of reasons why you’d want to know and why you might not already know.

Anyhow, this should be a relatively short article. There’s only so much fluff that I can add! I’m gonna tell you how to know for sure what architecture you can use.

Is my CPU 32 or 64 bit?

It was not that long ago that I saw someone asking this question at a forum I frequent. They wanted to know if their CPU supported 64 bit. The answer, which was well intended, was that they should run this command:

Which would indeed output this sort of text:

That’s great, but it’s not actually informative – as an answer to this specific question. What that command and output determine is that you’re using a specific variation of Linux. Granted, it’s true for those CPUs that support 62 bit and have a 62 bit CPU installed. It’s not always certain to be true, however.

For example, if you were using a 32 bit distro then the output from the ‘uname’ command would be 32 bit. You can run 32 bit Linux versions on 64 bit CPUs and the output will only be accurate so far as the version installed. After all, a 32 bit distro will run just fine on 64 bit hardware. Even if your hardware supports 64 bit, the uname command will output something about i686 if you have a 32 bit distro installed.

So, you could realistically have an output that says something about 32 bit while being perfectly capable of running 64 bit Linux versions. Using the uname command doesn’t tell you the hardware capability (necessarily). It tells you what is currently in use.

How do we know for sure? Well, there are a number of ways, but the easiest way that I can think of and it requires the terminal. Go ahead and open your terminal emulator by pressing CTRL + ALT + T on your keyboard.

Next, enter this ‘lshw‘ command:

In the output you will find something about ‘width’ and that’s your answer.

If you want, you can use ‘grep‘ to process the output and get an even easier, or at least more concise answer. Just use this command:

With any luck, that won’t lie to you. That won’t tell you what you’re using, that will tell you what CPU architecture you can use. If your CPU architecture supports it, it will tell you right then and there.

I’ve prepared a graphical demonstration of when it may present inaccurate information. The CPU is capable of 64 bit, but the OS in question is actually just a 32 bit OS.

32 vs 64 bit demonstration
See? The 32 bit OS is in use and it could use 64 bit.

There’s no doubt with the ‘lshw’ command, you learn if you can use 32 or 64 bit versions of Linux. That’s why it’s important to use that command rather than relying out the output of ‘uname’, as the ‘uname’ output only only tells you what CPU architecture you are currently using and not what CPU architecture you could be using.

And, there you have it. Thanks for reading! Don’t forget that you can sign up for the newsletter, donate, or simply opt to contribute to the site with articles of your own. If you want to lend a hand, let me know. I’m receptive to such things, as I am receptive to feedback!

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.