You are not logged in.

#1 2016-04-12 17:11:14

wtfn00
New Member
Registered: 2015-10-02
Posts: 4

/var/ is full

Hi folks,

While trying to update packages today, I discovered that /var/ is full.  I ran " du -Sh | sort -rh | head -n 15 " and got this output:

2.0G    ./cache/apt/archives
136M    ./cache/pbuilder
119M    ./cache/apt-xapian-index/index.1
90M    ./cache/pbuilder/aptcache
73M    ./lib/dpkg/info
43M    ./cache/apt
37M    ./lib/apt/lists
29M    ./lib/mysql
18M    ./log
17M    ./lib/postgresql/9.4/main/pg_xlog
15M    ./log/installer/cdebconf
14M    ./lib/apt/lists/partial
11M    ./cache/cups
9.0M    ./lib/dkms/virtualbox/4.3.36/build/vboxdrv
8.5M    ./cache/debconf

Through a little searching, I've found other folks have had issues with large log files, but it looks like the /cache/apt/archives is what's taking up more space.  I'd appreciate getting thoughts on how to safely free up space on /var/, as I'm not very familiar with what's lurking in this directory. 

I'm also curious if there might be something odd about the way I'd been managing packages that caused /cache/apt/archives to grow so large. 

Thanks.

Offline

#2 2016-04-12 17:41:10

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,069
Website

Re: /var/ is full

wtfn00 wrote:

how to safely free up space on /var/

You should use:

sudo apt-get clean

/var/cache/apt/archives contains all the .deb files that have been downloaded; when new package versions are installed, the old .deb files are kept there in case they need to be re-installed -- this is unlikely in Debian stable so `apt-get clean` can be run regularly to free up space.

wtfn00 wrote:

I'm also curious if there might be something odd about the way I'd been managing packages that caused /cache/apt/archives to grow so large

Well, mother Debian has had three point release upgrades since rc1 went out and the BL packages have been updated a lot as part of the development process so I don't think there's anything unusual about this.

Offline

#3 2016-04-12 18:21:57

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: /var/ is full

Would recommending to use the autoremove flag help with this as well?

apt-get autoremove

Apparently, according to the man page:

autoremove
autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#4 2016-04-12 18:28:51

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,069
Website

Re: /var/ is full

Horizon_Brave wrote:

Would recommending to use the autoremove flag help with this as well?

Not really.

If the OP has removed part of a metapackage then that command may proceed to remove half their desktop.

See http://forums.debian.net/viewtopic.php?t=104157 for more on this.

The OP could use:

apt-get -s autoremove

Then carefully check the output to see if any wanted packages are about to be removed; if the list was OK then the command could be run again as root and without the "-s" ("simulate") flag.

At any rate, this would just remove installed binaries and other files (such as documentation) -- the .deb files in /var (the problem directory) would be untouched by this command.

Offline

#5 2016-04-12 19:01:39

wtfn00
New Member
Registered: 2015-10-02
Posts: 4

Re: /var/ is full

Thanks for the quick reply and additional info about apt.

Offline

#6 2016-04-12 22:51:45

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,040
Website

Re: /var/ is full

Routine upgrades for a Debian "stable" system (terminal commands, not using Synaptic)...

sudo apt update && sudo apt upgrade

I usually reboot if there is a kernel or systemd upgrade.

Less strict cleaning maintenance...

sudo apt-get --purge autoremove && sudo apt-get clean

Let's leave this thread open in case someone has a severe disc-space issue and we have to come up with a workaround.


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#7 2016-04-12 23:02:46

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: /var/ is full

Is there an apt equivalent for apt-get's clean? apt clean doesn't work.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#8 2016-04-13 00:18:49

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,040
Website

Re: /var/ is full

What do you mean, it doesn't work? There is no terminal feedback, but it should clear your cache.

Eraph wrote:

apt clean doesn't work.

That's not what I posted. sudo apt-get clean


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#9 2016-04-13 00:45:34

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: /var/ is full

hhh wrote:

That's not what I posted. sudo apt-get clean

I know what you posted wink

I was asking if apt had its own equivalent. Your post demonstrates the use of:

sudo apt update && sudo apt upgrade

But you use apt-get to clean, so I was just wondering if apt has its own means of cleaning, or if apt only provides some improvements to some of apt-get's functionality.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#10 2016-04-13 01:38:59

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: /var/ is full

Configure less logfiles to be stored in /etc/logrotate*.

Offline

#11 2016-04-13 01:53:23

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: /var/ is full

According to 'man apt' there is no "apt clean"


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#12 2016-04-13 06:49:45

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,069
Website

Re: /var/ is full

@Eraph: read the output of:

man man apropos

Offline

#13 2016-04-13 06:53:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,069
Website

Re: /var/ is full

Eraph wrote:

if apt only provides some improvements to some of apt-get's functionality.

`apt` is supposed to be a more "user friendly" alternative to `apt-get` and has the progress bar & colour options enabled by default.

It has some useful extra functions -- `apt edit-sources` checks the file before saving (just like `visudo`) and `apt list --upgradable` will tell you what needs to be updated, etc.

However, it lacks some of the more technical options available in `apt-get` and, in particular, `aptitude`.

While `apt` is fine to use in a working Debian stable system (I prefer it myself), for troubleshooting or problem fixing I would recommend using:

sudo aptitude -u

https://www.debian.org/doc/manuals/aptitude/

Offline

#14 2016-04-13 06:53:21

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: /var/ is full

I think it maybe useful to mention the version of apt. The documentation isn't detailed.

man apt for version 1.2 has this:

Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details.

And NEWS.Debian for the same version has this:

[ 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.

I've got a thread on apt over at UF: http://ubuntuforums.org/showthread.php?t=2319347


Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

#15 2016-04-13 06:59:15

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,069
Website

Re: /var/ is full

vasa1 wrote:

NEWS.Debian for the same version has this

Ah yes, that was mentioned over at forums.debian.net
http://forums.debian.net/viewtopic.php?f=10&t=126674

The original bug report was from 2002...
yikes

Offline

#16 2016-04-13 09:00:04

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: /var/ is full

If you use synaptic to search packages it will build an apt-xapian-index file. This can get pretty big.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#17 2016-04-13 14:28:08

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: /var/ is full

damo wrote:

If you use synaptic to search packages it will build an apt-xapian-index file. This can get pretty big.

On some *buntu distros, apt-xapian-index can cause slowdowns: https://bugs.launchpad.net/ubuntu/+sour … bug/655831

Lubuntu 14.04 has Synaptic, but not apt-xapian-index.


Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

#18 2016-04-13 17:11:21

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: /var/ is full

damo wrote:

If you use synaptic to search packages it will build an apt-xapian-index file. This can get pretty big.

I'm guessing that other things (apt or apt-get) builds that as well.  I don't have synaptic here but I do have:

 13 Apr 16 @ 14:07:33 ~
  $ sff / apt-xapian-index
[sudo] password for sector11: 
/usr/share/apt-xapian-index
/usr/share/doc/apt-xapian-index
/var/cache/apt-xapian-index
/var/lib/apt-xapian-index
/etc/cron.weekly/apt-xapian-index
 
 13 Apr 16 @ 14:07:40 ~
  $ 

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#19 2016-04-13 19:07:26

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: /var/ is full

aptitude and synaptic Suggests apt-xapian-index, but apt doesn't


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#20 2016-04-13 19:20:43

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: /var/ is full

hmmm I'll have to stop using aptitude now.

]:D


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB