0

I know I can run sudo apt install gnome-tweak-tool and it will prompt me to enter sudo pass and then proceed to download and install gnome tweak tools. But what if I want to only download and not install it?

I know I can then do sudo apt install gnome-tweak-tool -d

I have however already installed it, and when running this command I get:

sudo apt install gnome-tweak-tool -d -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnome-tweak-tool is already the newest version (3.34.0-2ubuntu1).
0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade.

How do I download it, and keep a local copy? I want a local copy, because I am going to a place without internet and I have another laptop with me, where I want to install the some packages, but I wont be able to unless I have a local repository copy of them.

  • 1
    What worked was: sudo apt-get download gnome-tweak-tool and this got downloaded to the local folder – computinglaptop Jul 03 '20 at 10:24
  • I can however not download any package and its dependencies as long as the package is already latest version. There seems to be now way to work around the apt-get command to download only and not also install or have it check for already installed packages. – computinglaptop Jul 03 '20 at 10:31

1 Answers1

1

You could execute

sudo apt install --download-only gnome-tweak-tool

This will download gnome-tweak-tool with any dependencies you need and place them in /var/cache/apt/archives. Later a subsequent apt-get install gnome-tweak-tool will be able to complete without any extra downloads.

kanehekili
  • 6,402
  • This produces the same result. Reading package lists... Done Building dependency tree
    Reading state information... Done gnome-tweak-tool is already the newest version (3.34.0-2ubuntu1). 0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade.
    – computinglaptop Jul 01 '20 at 23:55
  • i kinda wish we could configure apt to not need sudo in this case – Fuseteam Jul 02 '21 at 14:21
  • why's that? If we don't use sudo when installing, then we got all these open doors Windows has. I do not agree... – kanehekili Jul 02 '21 at 21:02