• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

aptitude Command Examples in Linux

by admin

On a Linux system, the aptitude command is a package manager that is used to install, remove, and manage software packages. It is similar to the apt-get command, but it has a more user-friendly interface and additional features.

To use aptitude, you will need to have root privileges or use the sudo command to run it with superuser permissions. For more information and a complete list of aptitude commands, you can refer to the aptitude man page by running man aptitude in the terminal.

aptitude Command Examples

1. Synchronize list of packages and versions available. This should be run first, before running subsequent aptitude commands:

# aptitude update

2. Install a new package and its dependencies:

# aptitude install {{package}}

3. Search for a package:

# aptitude search {{package}}

4. Search for an installed package (?installed is an aptitude search term):

# aptitude search '?installed({{package}})'

5. Remove a package and all packages depending on it:

# aptitude remove {{package}}

6. Upgrade installed packages to the newest available versions:

# aptitude upgrade

7. Upgrade installed packages (like aptitude upgrade) including removing obsolete packages and installing additional packages to meet new package dependencies:

# aptitude full-upgrade

8. Put an installed package on hold to prevent it from being automatically upgraded:

# aptitude hold '?installed({{package}})'

Filed Under: Linux

Some more articles you might also be interested in …

  1. lsns: command not found
  2. lrzuntar: command not found
  3. UNIX / Linux : How to install and configure mutt
  4. lnav Command Examples in Linux
  5. Working with Vim editor (Text Editor)
  6. playerctl Command Examples in Linux
  7. Linux “shutdown”, “poweroff”, “halt”, “reboot” Commands
  8. How to setup passwordless SSH login in Linux
  9. goldeneye.py Command Examples in Linux
  10. CentOS / RHEL 6 : How to change SNMP log level

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright