Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
sudo: apt :command not found

What does this error mean? The apt command is not working, and I've lost the Software Center.

share|improve this question
You need to useapt-get in the command instead of apt. – hexafraction Sep 30 '12 at 23:55
To people voting to close this: This is definitely a real question, and there is already enough information for it to be answered. We should not close this question. I'll post a CW answer that include information others have said. – Eliah Kagan Oct 1 '12 at 1:41
I had the same problem, since I wanted to use apt-get to install something. It seems 'yum' was the default package manager in my case, which I should have used instead. Reference:… – Aditya Kumar Pandey Jan 7 '13 at 9:07

APT is a suite of utilities, including a database of information about what packages are available from where.

APT is not a single command. Rather, it provides several commands.

The most commonly used APT command is apt-get. That's what you should probably be using.

To update information about what packages are available and from where (which you should do before attempting to upgrade or install any packages with apt-get), run:

sudo apt-get update

To upgrade packages (i.e., "update your system"), run:

sudo apt-get upgrade

To upgrade packages, including packages that require uninstalled packages to be installed, or installed packages to be removed, run this (but be careful--it's best to pay attention to what will be added or removed):

sudo apt-get dist-upgrade

To install one or more packages, run this, replacing ... with the list of packages you want to install (if you want to install more than one package, put spaces between the package names):

sudo apt-get install ...

To remove one or more packages (i.e., to uninstall it), run:

sudo apt-get remove ...

To remove a package and also remove its systemwide configuration files (but not its per-user configuration files, which reside in users' home directories), run:

sudo apt-get purge ...

To remove packages that were installed automatically because other packages needed them, but which now are no longer needed, run:

sudo apt-get autoremove

To do that, and also remove their global configuration files"

sudo apt-get --purge autoremove

To reinstall a package, run:

sudo apt-get --reinstall install ...

To reinstall a package and delete its systemwide configuration files while doing so:

sudo apt-get --purge --reinstall install ...

To delete cached package installer (.deb) files (which does not remove any packages, but will make it so they have to be fetched over the network again to be reinstalled):

sudo apt-get clean

To deleted cached package installer files, but only for packages that are unlikely to be needed again (i.e., those that are so old they've been removed from the servers, as of last time sudo apt-get update was run):

sudo apt-get autoclean

That was just a brief overview. It does not capture all possible uses of apt-get, plus there are a number of other utilities provided in the APT suite, such as apt-cache for examining information about installed and available packages.

You can learn more by reading the apt-get and apt manual pages.

share|improve this answer
You could also add info about creating a bash alias for apt.. – jokerdino Oct 1 '12 at 4:29

There is no command just apt for that you've gotten this error. The list that Eliah Kagan provided you with can be a resource for using APT utilities but as answer for your question the problem in your writing of the command.

share|improve this answer

Are you trying to run apt-get?

Try running

sudo apt-get update

Let me know how that works.

share|improve this answer

apt is an actual command in 14.04 and it relates to apt-get and friends as can be seen here:

:~# apt
apt 1.0.1ubuntu2 for amd64 compiled on Oct 28 2014 20:55:14
Usage: apt [options] command

CLI for apt.
Basic commands:
list - list packages based on package names
search - search in package descriptions
show - show package details

update - update list of available packages

install - install packages
remove  - remove packages

upgrade - upgrade the system by installing/upgrading packages
full-upgrade - upgrade the system by removing/installing/upgrading packages

edit-sources - edit the source information file
share|improve this answer

"apt" is a java command please change to java jdk 6, in java 7 is deprecated.

share|improve this answer
You took it to the wrong side of the question... he's asking why apt (which he confuse with apt-get) is not working. – Braiam Sep 25 '13 at 17:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.