March 12, 2026
8-powerful-apt-commands-i-use-to-unlock-hidden-features-and-why-theyre-so-handy.jpg

I show You how To Make Huge Profits In A Short Time With Cryptos!

8 powerful Apt commands I use to unlock hidden features - and why they're so handy

Elyse Betters Picaro / ZDNET

Observe ZDNET: Add us as a most well-liked supply on Google.


ZDNET’s key takeaways

  • Apt is greater than only a software program installer.
  • The Debian/Ubuntu package deal supervisor can do rather more.
  • With these instructions at your disposal, apt turns into extra highly effective.

I’ve used Debian/Ubuntu-based distributions for many years. Due to that, I am fairly conversant in the Apt package deal supervisor. I’ve at all times discovered this command-line device to be fairly straightforward and environment friendly to make use of.

Additionally: Easy methods to set up Linux purposes from the command line

Though you may get away with simply utilizing the essential instructions, there’s rather more to Apt than simply set up, take away, replace, and improve. In truth, there are a number of lesser-known choices for Apt, and I will introduce you to them.

1. apt record

If you wish to know which packages are accessible, put in, and upgradeable, you need to use apt record. If you wish to get a whole record of packages, run:

apt record

That can present each obtainable package deal, whether or not put in or not. You in all probability will not assume that is very helpful, so you may wish to use a couple of helpful choices, resembling:

  • apt record –upgradable – lists all put in purposes that may be upgraded.
  • apt record –installed – lists all put in purposes

2. apt purge

Once you take away a package deal with sudo apt take away <packagename>, you are solely eradicating the software program. That leaves behind configurations, cache information, and different bits. If you wish to uninstall an software, together with all the pieces it would in any other case depart behind, use the purge choice.

The purge choice works like this:

sudo apt purge <package deal>

Additionally: I set up these 11 apps on each new Linux system, and you must, too – here is why

The place <package deal> is the identify of the software program to be eliminated.

3. apt search

You would possibly wish to examine whether or not any app you wish to set up is offered within the default Apt repository. For instance, you would possibly wish to set up Spotify, and also you’re unsure for those who can set up it with Apt. To search out out, subject the command:

apt search spotify

You in all probability will not see Spotify listed. As a substitute, you may see plenty of various choices. As soon as you’ve got run that command, you may both set up the app in query or you may transfer on to a different package deal supervisor to put in the software program. Within the case of Spotify, it may be put in by way of Flatpak or Snap.

One factor to bear in mind is that the outcomes of an apt search might be fuzzy. If you wish to view solely actual matches, the command can be:

apt search spotify | grep -i -w spotify

The above command would run the usual fuzzy search, however would restrict the outcomes to solely the search string used within the grep command.

4. apt present

Once you wish to view the main points a couple of package deal, you utilize apt present, which shows writer, obtain dimension, dependencies, supply repository, conflicts, and extra. This feature might be helpful while you wish to know what’s being put in earlier than working the set up command. 

Additionally: Putting in apps on Linux? 4 methods it is completely different than another OS – and errors to keep away from

To make use of apt present, the command is:

apt present <packagename>

For instance, you can subject:

apt present geary

The above command would show the entire particulars in regards to the Geary electronic mail software.

5. apt autoremove

Typically, while you uninstall an software, it would depart behind dependencies which are not wanted and take up area. After eradicating a number of apps, the gathering of unneeded software program can get fairly giant.

To do away with all of these packages which are not wanted, subject the command:

sudo apt autoremove

6. apt clear

Apt retains cached information, which might additionally take up room in your drive. Earlier than you take away them, perceive that the cache information serve the needs of allowing rollbacks, successfully dealing with dependencies, enabling offline set up, rushing up package deal installations, and saving area.

Nevertheless, if area is a matter, you may clear the Apt cache with the instructions:

sudo apt clear
sudo apt autoclean

7. apt mark

There is likely to be an event when you don’t need an software to improve. As an example, you might need learn {that a} specific improve breaks a characteristic you want. When you run apt improve, that software goes to be upgraded. 

To keep away from that, you may mark an app in order that it is blocked from being upgraded. For example you don’t need VirtualBox to be upgraded. To do this, the command can be:

sudo apt-mark maintain virtualbox

You’ll be able to view an inventory of all held packages with:

sudo apt-mark showhold

If you wish to unhold a package deal, the command is:

sudo apt-mark unhold <packagename>

8. apt obtain

For example you wish to obtain a package deal however not set up it but. You would possibly wish to obtain the .deb file to be put in on a machine that does not have entry to the exterior community (say, for safety functions), however you continue to want that app. You’ll be able to obtain the installer file and transfer it to the air-gapped machine.

Additionally: Snap vs. Flatpak: Easy methods to determine which Linux package deal supervisor is best for you

For example you wish to obtain the VirtualBox installer file. To do this, the command can be:

sudo apt obtain virtualbox

The .deb file can be saved to the present working listing.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *