How to fix -bash: aptitude: command not found Error

-bash: aptitude: command not found is an error you can get when you are just starting with a Linux VPS. Aptitude is an application management tool just like apt-get, but with more features. If you ever get this error on your VPS, this page will help to solve it.

Aptitude is a more advanced alternative to apt-get. You can use it to install and remove application from your server. The main deferent with aptitude and apt-get are you can use aptitude to search and query applications as well. Apt-get doesn’t offer it at the moment. And also, you won’t get an error like “Ëœcommand not found’ with apt-get.

You are more likely to get this error when you are trying to install an application in your Linux box with aptitude. As I said before it is a tool to manage application packages on your system. But unlike apt-get, it does not come with your OS. So you have to install it before using it. Error ‘bash: aptitude: command not found’ confirmed that you don’t have it on your VPS.

So to solve this, you need to install it on your server. The best way to do it is using apt-get to install it. You can give below command on CLI to install it.

sudo apt-get install aptitude

It’ll fix the error for most of you. But if your OS is not up to date, you’ll get an error like below.

Reading package lists... Done
Building dependency tree 
Reading state information... Done
E: Couldn't find package aptitude

This is a common error with Linux when package is not available on its dependency. Updating your VPS will fix it. Give below commands to update it.

sudo apt-get update
sudo apt-get upgrade

It may take couple of minutes to update. Run install command again after the update to install aptitude. It should install now. And from now on you won’t get -bash: aptitude: command not found on CLI for that server.

Tags
Show More

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

Related Articles

One Comment

Leave a Reply

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

Close