How to remove files to add space to root

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

How to remove files to add space to root

Post by bradrar »

I only have 512mb left in my root and it's making my pc go slow. I tried doing all that is in here : https://easylinuxtipsproject.blogspot.c ... t.html#ID1

I also tried sudo apt autoremove but It still is not enough. I get this problem everytime I update linux mint. I think that this is the problem but I don't know how to address it.

I also got this problem everytime I open update manager

Code: Select all

An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672FAn error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.winehq.org/wine-builds/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672FFailed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672FFailed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/xenial/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672FSome index files failed to download. They have been ignored, or old ones used instead.
I tried this:

Code: Select all

cd $HOME
rm -r .wine
rm .config/menus/applications-merged/wine*
rm -r .local/share/applications/wine
rm .local/share/desktop-directories/wine*
rm .local/share/icons/????_*.xpm
But it is still there.

Two problems:
1. PC is slow because 512MB left in root.
2. update manager gives me that error above.

I don't put many softwares inside my linux mint. only the ones I need, e.g.
  • visual studio code
  • mongodb
  • vlc
  • spotify
  • chrome
  • transmission

other than that, I have pictures and videos and files saved in the documents,downloads, and video folders. but is not related to root.

Can someone help ?

User avatar
philotux
Level 5
Level 5
Posts: 832
Joined: Sat Jul 21, 2018 11:14 am
Location: Utopia

Re: How to remove files to add space to root

Post by philotux »

Try

Code: Select all

sudo apt clean
to clean up your apt archive.

Also if you use Timeshift with it's default settings, it will save the snapshots under root. If this is the case, delete some of those.

Please post also the output of

Code: Select all

df -h
Last edited by philotux on Thu Feb 07, 2019 3:59 am, edited 1 time in total.

User avatar
Moem
Level 20
Level 20
Posts: 11012
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: How to remove files to add space to root

Post by Moem »

You're saying you also removed old kernels, is that true? Old kernels are a common cause of too little space left in root.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
philotux
Level 5
Level 5
Posts: 832
Joined: Sat Jul 21, 2018 11:14 am
Location: Utopia

Re: How to remove files to add space to root

Post by philotux »

bradrar wrote:
Thu Feb 07, 2019 3:41 am
other than that, I have pictures and videos and files saved in the documents,downloads, and video folders. but is not related to root.
No, if your home is on a separate partition.
Yes, if not.

User avatar
Pierre
Level 20
Level 20
Posts: 10210
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: How to remove files to add space to root

Post by Pierre »

Hi bradrar - - can you clarify, if you have attempted to Remove Any Older kernels ?
& if so - then what method that you tried to utilise ?.
also that you are using the later version of LM19x ? - - as this version is known, for this particular error.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

Hoser Rob
Level 16
Level 16
Posts: 6079
Joined: Sat Dec 15, 2012 8:57 am

Re: How to remove files to add space to root

Post by Hoser Rob »

If you do remove old kernels don't remove all of them, always leave the last one that worked.

You can also look in /var/log to see if you havbe any huge log files, which also indicate something else to look at.

There may also be some big bit of app software you don't use like gimp that can be removed.

You can see what packages are using the most space if you install debian-goodies. Then run in the terminal

Code: Select all

sudo dpigs
which will list the 10 biggest ones. If you want more use eg.

Code: Select all

sudo dpigs -n 12
to list the biggest 12.

NOTE: be careful deleting packages like this, Linux is highly modular and you may delete something needed by another program.

P.S. another thing you get with debian-goodies is checkrestart, I use that all the time when updating. There's a common misconception that there's no need to reboot Linux after an update unless it's a kernel. If you run sudo checkrestart after updating it'll say if a package is still using old libraries, which can be a security risk.

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

Pierre wrote:
Thu Feb 07, 2019 7:02 am
Hi bradrar - - can you clarify, if you have attempted to Remove Any Older kernels ?
& if so - then what method that you tried to utilise ?.
also that you are using the later version of LM19x ? - - as this version is known, for this particular error.
Hello, I have removed the old kernels from my system, This is the code i used:

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed 's/-generic//')/d" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
This was mentioned to me by gm10 because last last month, my fileroot system is full.

I think that I am using later version of LM19x. because I didn't do any major update, all I do everyday if I turn on my PC is click the package manager and install all updates. That's it

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

philotux wrote:
Thu Feb 07, 2019 3:56 am
Try

Code: Select all

sudo apt clean
to clean up your apt archive.

Also if you use Timeshift with it's default settings, it will save the snapshots under root. If this is the case, delete some of those.

Please post also the output of

Code: Select all

df -h
I tried sudo apt clean, nothing changes.

also here is the output.

Code: Select all

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M  1.5M  384M   1% /run
/dev/sda6        12G   10G  1.2G  90% /
tmpfs           1.9G   40M  1.9G   3% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/loop0      145M  145M     0 100% /snap/skype/63
/dev/loop1       90M   90M     0 100% /snap/core/6130
/dev/loop2      148M  148M     0 100% /snap/skype/66
/dev/loop3       92M   92M     0 100% /snap/core/6259
/dev/loop4       91M   91M     0 100% /snap/core/6350
/dev/sda1       256M   31M  226M  13% /boot/efi
/dev/sda8        42G   35G  4.9G  88% /home
tmpfs           386M   36K  386M   1% /run/user/1000

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

Hoser Rob wrote:
Thu Feb 07, 2019 8:16 am
If you do remove old kernels don't remove all of them, always leave the last one that worked.

You can also look in /var/log to see if you havbe any huge log files, which also indicate something else to look at.

There may also be some big bit of app software you don't use like gimp that can be removed.

You can see what packages are using the most space if you install debian-goodies. Then run in the terminal

Code: Select all

sudo dpigs
which will list the 10 biggest ones. If you want more use eg.

Code: Select all

sudo dpigs -n 12
to list the biggest 12.

NOTE: be careful deleting packages like this, Linux is highly modular and you may delete something needed by another program.

P.S. another thing you get with debian-goodies is checkrestart, I use that all the time when updating. There's a common misconception that there's no need to reboot Linux after an update unless it's a kernel. If you run sudo checkrestart after updating it'll say if a package is still using old libraries, which can be a security risk.

Code: Select all

$ sudo dpigs
sudo: dpigs: command not found
$ sudo dpigs -n 12
sudo: dpigs: command not found
Why is it saying command not found? Did I delete some important package or something?

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

philotux wrote:
Thu Feb 07, 2019 4:02 am
bradrar wrote:
Thu Feb 07, 2019 3:41 am
other than that, I have pictures and videos and files saved in the documents,downloads, and video folders. but is not related to root.
No, if your home is on a separate partition.
Yes, if not.
Home is on separate partition.

User avatar
philotux
Level 5
Level 5
Posts: 832
Joined: Sat Jul 21, 2018 11:14 am
Location: Utopia

Re: How to remove files to add space to root

Post by philotux »

Code: Select all

/dev/sda6        12G   10G  1.2G  90% /
Still looks quite full.

You could try running Disk Usage analyzer (baobab) to get a graphical overview of your disk usage and hopefully identify what is taking up the space.
And honestly 12GB for a root partition is rather on the smallest side. I believe the recommended size for a Mint root partition is in the region of 25-30 GB.

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

Moem wrote:
Thu Feb 07, 2019 3:58 am
You're saying you also removed old kernels, is that true? Old kernels are a common cause of too little space left in root.
I removed old kernels . I did that with this code:

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed 's/-generic//')/d" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
I asked this last time here: viewtopic.php?f=90&t=277572

So far, here is what I did:

Code: Select all

apt autoremove
apt clean

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed 's/-generic//')/d" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
clean out old logs:

Code: Select all

sudo rm -r /var/log/*.1 /var/log/*.gz /var/log/*.old /var/log/journal/*

User avatar
philotux
Level 5
Level 5
Posts: 832
Joined: Sat Jul 21, 2018 11:14 am
Location: Utopia

Re: How to remove files to add space to root

Post by philotux »

bradrar wrote:
Thu Feb 07, 2019 8:41 am
Why is it saying command not found? Did I delete some important package or something?
No, you need to install debian-goodies for running those commands:

Code: Select all

sudo apt install debian-goodies

User avatar
Moem
Level 20
Level 20
Posts: 11012
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: How to remove files to add space to root

Post by Moem »

philotux wrote:
Thu Feb 07, 2019 8:47 am
honestly 12GB for a root partition is rather on the smallest side.
That's what I'm thinking, too.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

philotux wrote:
Thu Feb 07, 2019 8:47 am

Code: Select all

/dev/sda6        12G   10G  1.2G  90% /
Still looks quite full.

You could try running Disk Usage analyzer (baobab) to get a graphical overview of your disk usage and hopefully identify what is taking up the space.
And honestly 12GB for a root partition is rather on the smallest side. I believe the recommended size for a Mint root partition is in the region of 25-30 GB.

I am looking at Disk Usage analyzer now.

Image

here is inside usr:
Image

I don't really know how to approach this as I might delete some important files.

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

Moem wrote:
Thu Feb 07, 2019 8:50 am
philotux wrote:
Thu Feb 07, 2019 8:47 am
honestly 12GB for a root partition is rather on the smallest side.
That's what I'm thinking, too.
Should I reinstall my linux mint and make it 40GB?

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

Code: Select all

$ sudo dpigs
274301 linux-firmware
238797 spotify-client
199433 google-chrome-stable
195699 wine-stable-amd64
190005 code
179398 wine-stable-i386
178447 firefox
167065 linux-modules-extra-4.15.0-45-generic
157154 libgl1-mesa-dri
143544 libgl1-mesa-dri
I thought I deleted wine? Why is it there? also, Spotify is not On right now. Is that normal?

User avatar
Moem
Level 20
Level 20
Posts: 11012
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: How to remove files to add space to root

Post by Moem »

bradrar wrote:
Thu Feb 07, 2019 8:54 am
Should I reinstall my linux mint and make it 40GB?
That would help, but you could also boot from a live DVD or USB and then use GParted to make the existing partition bigger.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
Pepi
Level 5
Level 5
Posts: 965
Joined: Wed Nov 18, 2009 7:47 pm

Re: How to remove files to add space to root

Post by Pepi »

bradrar wrote:
Thu Feb 07, 2019 8:54 am
Moem wrote:
Thu Feb 07, 2019 8:50 am
philotux wrote:
Thu Feb 07, 2019 8:47 am
honestly 12GB for a root partition is rather on the smallest side.
That's what I'm thinking, too.
Should I reinstall my linux mint and make it 40GB?
If doing that is not a big issue for you then I would say YES With 12 gb you're running out of gas

bradrar
Level 2
Level 2
Posts: 54
Joined: Sun Aug 19, 2018 2:48 am

Re: How to remove files to add space to root

Post by bradrar »

Moem wrote:
Thu Feb 07, 2019 9:06 am
bradrar wrote:
Thu Feb 07, 2019 8:54 am
Should I reinstall my linux mint and make it 40GB?
That would help, but you could also boot from a live DVD or USB and then use GParted to make the existing partition bigger.
do you know any resources that I can follow to make my partition bigger?

Post Reply

Return to “Newbie Questions”