Unable to remove programs

15 réponses [Dernière contribution]
SVTony
Hors ligne
A rejoint: 02/07/2014

I keep getting the message that I have very little disk space remaining. I tried removing some programs I don't use from the list of installed ones, but it won't let me remove anything when I uncheck them. Any ways to get around this?

danieru
Hors ligne
A rejoint: 01/06/2013

Perhaps you allowed the installer do the partition table and you end up with low disk space for /?
Please run this command and paste the output: lsblk
This way I can know if you have too little space assigned for /

SVTony
Hors ligne
A rejoint: 02/07/2014

This is what I get:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 14G 0 part /
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 10.4G 0 part [SWAP]
└─sda6 8:6 0 441.4G 0 part /home
sr0 11:0 1 1024M 0 rom

loldier
Hors ligne
A rejoint: 02/17/2016

df -h would be easier to read.

I'd try

sudo apt-get autoremove --purge

to remove unneeded dependencies, if any.

danieru
Hors ligne
A rejoint: 01/06/2013

> "sda 8:0 0 465.8G 0 disk"
You have more than enough disk-space, but:
> "sda1 8:1 0 14G 0 part /"
Indeed. The installer assigned only 14GB for /. I had this very same problem.

And the solution for me was format and make the partitions manually with the intelligence only a human posses.
Making the partition table right is the longterm solution because even if you remove programs, you can't install (for example) FlightGear.

Try executing:
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
To regain some space.

SVTony
Hors ligne
A rejoint: 02/07/2014

Alright. I'll try doing that. Thanks.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Also, remember that updated kernels do not replace older ones, i.e., you should remove by hand (e.g., using the "Synaptic package manager" in the "System Settings", search for the "linux-*" packages) an older kernel once you are sure that the newer one properly works.

SVTony
Hors ligne
A rejoint: 02/07/2014

I decided to expand the partition for "/" but I've encountered an issue.

I'm using GParted and it won't let me unmount it or modify it. I tried unmounting with the terminal using "sudo umount /dev/sda1" but it gives me the following message: "device is busy.(In some cases useful info about processes that use the device is found by lsof(8) or fuser(1))"

Any ideas on how to solve it?

SuperTramp83

I am a translator!

Hors ligne
A rejoint: 10/31/2014

> it gives me the following message: "device is busy.

Pardon my comment but I don't know your level of expertise..
You are not trying to do that within your normal Trisquel session, right? To do that you will need to use a live DVD / USB

http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/

b.mckay@ucc.ie
Hors ligne
A rejoint: 01/18/2016

This command will relieve you of all old kernel versions, giving you more space:

sudo echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge

SVTony
Hors ligne
A rejoint: 02/07/2014

Thank you. That freed more than 5 GiB, according to the program. It should last for a while. Still, the partition's total size is only 13.97 GiB, so I'd like to find a way to expand it.

onpon4
Hors ligne
A rejoint: 05/30/2012

Expanding it would be risky, so if I were you I would wait until your next upgrade. Then what I would do is abandon the approach of having a separate /home partition and just make it all one partition (this is what I do now).

That amount of space should be fine as long as you periodically remove old kernel images.

SVTony
Hors ligne
A rejoint: 02/07/2014

I see. I've no idea how I got this very small home partition. I'll have to remove the old kernel images next time I'm running out of space, if I can't find any other solution. Thanks for your help.

lembas
Hors ligne
A rejoint: 05/13/2010

Another thing you can easily and absolutely risk free do is clean the apt cache.sudo apt-get clean

Of course, if you first make backups, then resizing the partitions is risk free as well.

SVTony
Hors ligne
A rejoint: 02/07/2014

I did sudo apt-get clean before. I made a backup of my files and would like to resize but wasn't able to do it yet.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

If that implies making an XFS partition smaller, then it is "normal": XFS cannot be shrunk. XFS is the default filesystem Trisquel's installer uses for /home.

One solution (from a Live system) is to:

  1. move /home's content to another partition (with a filesystem that understands UNIX's permissions!);
  2. delete /home's partition;
  3. extend the partition you want to extend;
  4. recreate a partition for /home and choose a filesystem for it (it can be XFS again or not);
  5. move the user files "back" to the newly created partition.

An alternative would be to get rid of a separate /home altogether, i.e., move the current content of /home to the actual home folder on the root partition and (after deleting /home's partition) to extend this partition taking all the available space.