Wednesday, May 4, 2016

Where are packages stored installed with APT in Ubuntu 16.04?


I know that packages installed with apt-get are stored in /var/cache/apt/archives.
I just installed mariadb server in Ubuntu 16.04 with following command:


sudo apt install mariadb-server

When I tried to find packages in /var/cache/apt/archives, there are no packages. Where are they stored if it's not in this directory?



If you use apt instead of apt-get, the default is not to store debs anywhere if the apt install is successful.


From /usr/share/doc/apt/NEWS.Debian.gz:



apt (1.2~exp1) experimental; urgency=medium


[ Automatic removal of debs after install ]
After packages are successfully installed by apt(8),
the corresponding .deb package files will be
removed from the /var/cache/apt/archives cache directory.


This can be changed by setting the apt configuration option
Binary::apt::APT::Keep-Downloaded-Packages to true. E.g:


# echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/01keep-debs

Please note that the behavior of apt-get is unchanged. The
downloaded debs will be kept in the cache directory after they
are installed. To enable the behavior for other tools, you can set
APT::Keep-Downloaded-Packages to false.



No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...