Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my file browser, it lists all the drives and devices available for browsing. There is one that is from another OS installation, and I want to remove it from the list.

Hiding devices using /etc/udev/rules.d/ works for other devices I want to hide, except this one.

The UUID for the device is different from the ones for the partitions.

$ sudo blkid

-shows this device is associated with the device mapper.

deleting the link in /dev/mapper/relevant-link-name didnt work because device mapper made another very quickly.

How can I hide this device from the file browser?

share|improve this question

Device mapper creates references to partitions or devices, and associates a UUID that is different to the one seen in partition managers. Its not a new or separate device, its just a new reference.

The file browser will display this device, even if it is hidden by a rule in /etc/udev/rules.d/

Use the file browser to get the UUID of the device, via properties.

List all the devices and find the one with that UUID, find out its name:

$ sudo blkid

If the device you want to hide is associated with the device mapper, ie /dev/mapper/device-name you can proceed to remove that reference by following the instructions below.

List the LVM devices to see if that device appears:

$ sudo lvdisplay

If so, then list the device mapper groups to see if it matches:

$ sudo vgscan

If so, then delete that group (change groupname to yours, no quotes):

$ sudo vgremove groupname

The device should no longer appear in your browser, even after restarting.

share|improve this answer

Using lvdisplay, vgscan, vgremove as @user195059 suggests probably works, but they are in the lvm2 package which I no longer have installed.

Instead I used

$ sudo dmsetup info

which showed "Name: unwantedDevice" of my unwanted /dev/mapper/unwantedDevice and "State: ACTIVE". I unmounted the device (from its menu in the Unity panel), then issued

$ sudo dmsetup remove unwantedDevice

and it looks like it took. I also ran sudo update-initramfs -u.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.