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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. LVM Snapshot: Backup and restore LVM Partition in Linux
  2. What happens in the Background when you execute the “useradd” command under Linux
  3. btrfs property Command Examples in Linux
  4. git commit-tree: Low level utility to create commit objects
  5. darkhttpd: Darkhttpd web server
  6. getcap Command Examples in Linux
  7. Understanding SELinux File Labelling and SELinux Context
  8. setxkbmap: command not found
  9. pkginfo Command Examples in Linux
  10. lastcomm Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright