For so many commands which i type are correct even then i have errors like unable to locate package or sometimes it gives "invalid operation" . This error really kills me, how can i fix this?

  • 2
    Note: instead of apt-get you can use apt. It does the same things in a more beginner friendly way plus it colorize output etc. – Bakuriu Mar 21 '16 at 21:14
  • @Bakuriu make it an answer with some examples or I will add it into mine and profit from it ;-) – Rinzwind Mar 22 '16 at 7:46


sudo apt-get cpufrequtils

is missing a mandatory option. To install or remove use...

sudo apt-get install cpufrequtils
sudo apt-get remove cpufrequtils
  • Rinzwind's answer is correct but just to add some help if you are not sure you are choosing the correct package name you can look it up with 'apt-cache search [package-name]'. Even with a partial package name this will return a list of similar packages. – EnterUserNameHere Jul 16 '17 at 15:29
  • hahaha, I feel like an idiot.. i forgot the "install" option... – Alex Angelico Mar 12 '18 at 15:25

An more morecent alternative to apt-get is the apt command (see here for a discussion about their differences).

Maybe using apt you more easily realize that installing isn't the only thing that these tool do. And as such you first have to tell them the operation you want to perform:

sudo apt install cpufrequtils

Without the install the command wouldn't know whether you want to install or uninstall that package or if you simply want to search for it.

The name apt-get may sound like it only "gets"("install") the programs, but this isn't true.

You should prefer apt for interactive use as it provides a cleaner interface and colorized human friendly output. Use apt-get or apt-cache for scripts.

protected by Community Mar 15 '18 at 13:48

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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