5

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 Answers2

15

This

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
  • 309,379
1

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.

Bakuriu
  • 642