0

This question already has an answer here:

When I used the command following output is showing.

$ sudo apt-get install gparted
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gparted

$ apt-cache policy gparted
N: Unable to locate package gparted

marked as duplicate by karel, user535733, David Foerster, Fabby, Goddard May 30 '18 at 23:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I am a new user on ubuntu please tell me briefly.. – Moin Khan May 29 '18 at 9:08
  • Your command looks okay to me; so I'd suggest entering the following command apt-cache policy gparted and adding its output to your question. The only obvious thing missing is you need to update your repository lists with the command sudo apt-get update before you sudo apt-get install gparted (if you are using a 'live' environment it must be done each boot) – guiverc May 29 '18 at 9:12
  • I updated my reository using above command but it is not useful – Moin Khan May 29 '18 at 9:16
  • please add the apt-cache policy gparted command and output to your question. Did you get any errors with the sudo apt-get update? – guiverc May 29 '18 at 9:18
  • 1
    The output is showing as --Unable to locate package gparted – Moin Khan May 29 '18 at 9:30
5

You need update the apt repository lists using:

sudo apt-get update 

then try again

sudo apt-get install gparted

Also you can install Gparted from the source. To do so, run the following commands in Terminal:

sudo apt-get build-dep gparted
sudo apt-get install git gnome-common
git clone git://git.gnome.org/gparted
cd gparted
./autogen.sh
make 
sudo make install

Also if none above works please check your /etc/apt/sources.list or try to change to main server and then run again: sudo apt update

default apt source list:

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
# deb http://archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
1
sudo apt-get install gparted

The above command should work fine. If it's not, you can download the file and do it manually also.

This question addresses the same problem that you have, you can have a look at "Unable to locate package" while trying to install packages with APT.

0

Just use the apt command like this:

$ sudo apt install gparted

That should work, let us know.

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